|
@@ -146,24 +146,34 @@ static void show_splash_screen() {
|
|
|
furi_record_close(RECORD_GUI);
|
|
furi_record_close(RECORD_GUI);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int32_t upython(void* p) {
|
|
|
|
|
- UNUSED(p);
|
|
|
|
|
-
|
|
|
|
|
|
|
+int32_t upython(void* args) {
|
|
|
do {
|
|
do {
|
|
|
- show_splash_screen();
|
|
|
|
|
|
|
+ if(args == NULL) {
|
|
|
|
|
+ show_splash_screen();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if(action == ActionExit) {
|
|
if(action == ActionExit) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- FuriString* file_path = furi_string_alloc_set_str(APP_ASSETS_PATH("upython"));
|
|
|
|
|
|
|
+ FuriString* file_path = NULL;
|
|
|
|
|
+
|
|
|
|
|
+ if(args != NULL) {
|
|
|
|
|
+ file_path = furi_string_alloc_set_str(args);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ file_path = furi_string_alloc_set_str(APP_ASSETS_PATH("upython"));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if(select_python_file(file_path)) {
|
|
|
|
|
|
|
+ if(args != NULL || select_python_file(file_path)) {
|
|
|
execute_file(file_path);
|
|
execute_file(file_path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
furi_string_free(file_path);
|
|
furi_string_free(file_path);
|
|
|
|
|
|
|
|
|
|
+ if(args != NULL) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
action = ActionNone;
|
|
action = ActionNone;
|
|
|
} while(true);
|
|
} while(true);
|
|
|
|
|
|