mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 15:50:36 -08:00
Check for SD
This commit is contained in:
@@ -128,6 +128,7 @@ void MenuFunctions::writeBadUSB(){
|
||||
lv_textarea_set_text(ta1, "");
|
||||
lv_textarea_set_placeholder_text(ta1, "Ducky script");
|
||||
|
||||
if (sd_obj.supported) {
|
||||
// Create load button
|
||||
lv_obj_t * label;
|
||||
lv_obj_t * load_btn = lv_btn_create(lv_scr_act(), NULL);
|
||||
@@ -147,6 +148,7 @@ void MenuFunctions::writeBadUSB(){
|
||||
lv_obj_align(save_as_btn, ta1, LV_ALIGN_IN_TOP_MID, NULL, (LV_VER_RES / 2) - 35); // align to text area
|
||||
label2 = lv_label_create(save_as_btn, NULL);
|
||||
lv_label_set_text(label2, "Save As");
|
||||
}
|
||||
|
||||
// Focus it on one of the text areas to start
|
||||
lv_keyboard_set_textarea(kb, ta1);
|
||||
@@ -313,12 +315,6 @@ void test_btn_cb(lv_obj_t * btn, lv_event_t event) {
|
||||
display_string.toCharArray(buf, display_string.length() + 1);
|
||||
|
||||
lv_textarea_set_text(ta1, buf);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the file list obj
|
||||
lv_obj_del_async(lv_obj_get_parent(lv_obj_get_parent(btn)));
|
||||
menu_function_obj.loaded_file = btn_text;
|
||||
|
||||
// Create Save button
|
||||
lv_obj_t * save_label;
|
||||
@@ -332,6 +328,12 @@ void test_btn_cb(lv_obj_t * btn, lv_event_t event) {
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the file list obj
|
||||
lv_obj_del_async(lv_obj_get_parent(lv_obj_get_parent(btn)));
|
||||
menu_function_obj.loaded_file = btn_text;
|
||||
}
|
||||
}
|
||||
|
||||
void load_btn_cb(lv_obj_t * load_btn, lv_event_t event) {
|
||||
extern SDInterface sd_obj;
|
||||
extern MenuFunctions menu_function_obj;
|
||||
|
||||
Reference in New Issue
Block a user