|
|
@@ -1,4 +1,5 @@
|
|
|
#include "ifttt_virtual_button.h"
|
|
|
+#include <expansion/expansion.h>
|
|
|
|
|
|
#define IFTTT_FOLDER "/ext/apps_data/ifttt"
|
|
|
#define IFTTT_CONFIG_FOLDER "/ext/apps_data/ifttt/config"
|
|
|
@@ -227,6 +228,10 @@ void ifttt_virtual_button_app_free(VirtualButtonApp* app) {
|
|
|
|
|
|
int32_t ifttt_virtual_button_app(void* p) {
|
|
|
UNUSED(p);
|
|
|
+
|
|
|
+ // Disable expansion protocol to avoid interference with UART Handle
|
|
|
+ Expansion* expansion = furi_record_open(RECORD_EXPANSION);
|
|
|
+ expansion_disable(expansion);
|
|
|
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
|
|
if(!storage_simply_mkdir(storage, IFTTT_FOLDER)) {
|
|
|
@@ -242,5 +247,10 @@ int32_t ifttt_virtual_button_app(void* p) {
|
|
|
|
|
|
view_dispatcher_run(app->view_dispatcher);
|
|
|
ifttt_virtual_button_app_free(app);
|
|
|
+
|
|
|
+ // Return previous state of expansion
|
|
|
+ expansion_enable(expansion);
|
|
|
+ furi_record_close(RECORD_EXPANSION);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|