Просмотр исходного кода

Merge pull request #30 from leedave/feature/bugfix_firstsave

Bugfixes firstsave & SubGHz RAW loop transmit
David Lee 11 месяцев назад
Родитель
Сommit
69194d1ed5
7 измененных файлов с 12 добавлено и 11 удалено
  1. 1 1
      README.md
  2. 1 1
      application.fam
  3. 4 0
      docs/changelog.md
  4. 0 7
      helpers/subghz/subghz.c
  5. 1 1
      helpers/xremote_storage.c
  6. 4 0
      xremote.c
  7. 1 1
      xremote_i.h

+ 1 - 1
README.md

@@ -54,7 +54,7 @@ Then run the command:
 The application will be compiled and copied onto your device. 
 The application will be compiled and copied onto your device. 
 
 
 ## Thank you notes
 ## Thank you notes
-- [Willy-JL](https://github.com/Willy-JL) for distributing in Momentum Firmware
+- [Willy-JL](https://github.com/Willy-JL) for code contributions and distributing in Momentum Firmware
 - [Roguemaster](https://github.com/RogueMaster/flipperzero-firmware-wPlugins) for distributing in Roguemaster Firmware
 - [Roguemaster](https://github.com/RogueMaster/flipperzero-firmware-wPlugins) for distributing in Roguemaster Firmware
 - [Miccayo](https://github.com/miccayo) for contributing the loop transmit feature
 - [Miccayo](https://github.com/miccayo) for contributing the loop transmit feature
 
 

+ 1 - 1
application.fam

@@ -6,7 +6,7 @@ App(
     stack_size=3 * 1024,
     stack_size=3 * 1024,
     fap_icon="icons/xremote_10px.png",
     fap_icon="icons/xremote_10px.png",
     fap_icon_assets="icons",
     fap_icon_assets="icons",
-    fap_version="3.0",
+    fap_version="3.1",
     fap_category="Infrared",
     fap_category="Infrared",
     fap_author="Leedave",
     fap_author="Leedave",
     fap_description="One-Click, sends multiple commands",
     fap_description="One-Click, sends multiple commands",

+ 4 - 0
docs/changelog.md

@@ -1,3 +1,7 @@
+## 3.1
+- Bugfix to enable save on first use (thanks to WillyJL)
+- Bugfix for loop transmit when using RAW SubGHz transmissions
+
 ## 3.0
 ## 3.0
 - Added loop transmit feature (thanks to miccayo)
 - Added loop transmit feature (thanks to miccayo)
 - Replaced transmission counter with animations
 - Replaced transmission counter with animations

+ 0 - 7
helpers/subghz/subghz.c

@@ -28,13 +28,6 @@ void subghz_scene_transmit_callback_end_tx(void* context) {
     furi_assert(context);
     furi_assert(context);
     FURI_LOG_D(TAG, "callback end");
     FURI_LOG_D(TAG, "callback end");
     XRemote* app = context;
     XRemote* app = context;
-    view_dispatcher_send_custom_event(
-        app->view_dispatcher, XRemoteCustomEventViewTransmitterSendStop);
-
-    //app->state_notifications = SubGhzNotificationStateIDLE;
-    //subghz_txrx_stop(app->subghz->txrx);
-    //app->transmitting = false;
-    //xremote_scene_ir_notification_message(app, SubGhzNotificationMessageBlinkStop);
     xremote_cross_remote_set_transmitting(app->cross_remote, XRemoteTransmittingStopSubghz);
     xremote_cross_remote_set_transmitting(app->cross_remote, XRemoteTransmittingStopSubghz);
 }
 }
 
 

+ 1 - 1
helpers/xremote_storage.c

@@ -30,7 +30,7 @@ void xremote_save_settings(void* context) {
     }
     }
 
 
     // Open File, create if not exists
     // Open File, create if not exists
-    if(!storage_common_stat(storage, XREMOTE_SETTINGS_SAVE_PATH, NULL) == FSE_OK) {
+    if(storage_common_stat(storage, XREMOTE_SETTINGS_SAVE_PATH, NULL) != FSE_OK) {
         FURI_LOG_D(
         FURI_LOG_D(
             TAG, "Config file %s is not found. Will create new.", XREMOTE_SETTINGS_SAVE_PATH);
             TAG, "Config file %s is not found. Will create new.", XREMOTE_SETTINGS_SAVE_PATH);
         if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) {
         if(storage_common_stat(storage, CONFIG_FILE_DIRECTORY_PATH, NULL) == FSE_NOT_EXIST) {

+ 4 - 0
xremote.c

@@ -203,6 +203,10 @@ int32_t xremote_app(void* p) {
 
 
     furi_hal_power_suppress_charge_enter();
     furi_hal_power_suppress_charge_enter();
 
 
+    Storage* storage = furi_record_open(RECORD_STORAGE);
+    storage_common_mkdir(storage, XREMOTE_APP_FOLDER);
+    furi_record_close(RECORD_STORAGE);
+
     view_dispatcher_run(app->view_dispatcher);
     view_dispatcher_run(app->view_dispatcher);
 
 
     xremote_save_settings(app);
     xremote_save_settings(app);

+ 1 - 1
xremote_i.h

@@ -51,7 +51,7 @@
 #define XREMOTE_TEXT_STORE_SIZE 128
 #define XREMOTE_TEXT_STORE_SIZE 128
 #define XREMOTE_MAX_ITEM_NAME_LENGTH 22
 #define XREMOTE_MAX_ITEM_NAME_LENGTH 22
 #define XREMOTE_MAX_REMOTE_NAME_LENGTH 22
 #define XREMOTE_MAX_REMOTE_NAME_LENGTH 22
-#define XREMOTE_VERSION "3.0"
+#define XREMOTE_VERSION "3.1"
 
 
 #define INFRARED_APP_EXTENSION ".ir"
 #define INFRARED_APP_EXTENSION ".ir"
 #define INFRARED_APP_FOLDER EXT_PATH("infrared")
 #define INFRARED_APP_FOLDER EXT_PATH("infrared")