mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Merge branch 'dev' into leeroy_dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
## Main changes
|
## Main changes
|
||||||
- Current API: 87.5
|
- Current API: 87.6
|
||||||
* SubGHz: **Cardin S449 protocol full support** (64bit keeloq) (with Add manually, and all button codes) (**use FSK12K modulation to read the remote**) (closes issues #735 #908) (by @xMasterX and @zero-mega (thanks!))
|
* SubGHz: **Cardin S449 protocol full support** (64bit keeloq) (with Add manually, and all button codes) (**use FSK12K modulation to read the remote**) (closes issues #735 #908) (by @xMasterX and @zero-mega (thanks!))
|
||||||
* SubGHz: **Beninca ARC AES128 protocol full support** (128bit dynamic) (with Add manually, and 3 button codes) (resolves issue #596) (by @xMasterX and @zero-mega)
|
* SubGHz: **Beninca ARC AES128 protocol full support** (128bit dynamic) (with Add manually, and 3 button codes) (resolves issue #596) (by @xMasterX and @zero-mega)
|
||||||
* SubGHz: **Treadmill37 protocol support** (37bit static) (by @xMasterX)
|
* SubGHz: **Treadmill37 protocol support** (37bit static) (by @xMasterX)
|
||||||
@@ -19,12 +19,15 @@
|
|||||||
* SubGHz: KeeLoq **display BFT programming mode TX** (when arrow button is held)
|
* SubGHz: KeeLoq **display BFT programming mode TX** (when arrow button is held)
|
||||||
* SubGHz: KeeLoq **add counter mode 7 (sends 7 signals increasing counter with 0x3333 steps)** - may bypass counter on some receivers!
|
* SubGHz: KeeLoq **add counter mode 7 (sends 7 signals increasing counter with 0x3333 steps)** - may bypass counter on some receivers!
|
||||||
* SubGHz: Add signals button editor and real **remote simulation** (full signal transmit with just one click) (PR #956 #958 | by @Dmitry422)
|
* SubGHz: Add signals button editor and real **remote simulation** (full signal transmit with just one click) (PR #956 #958 | by @Dmitry422)
|
||||||
|
* SubGHz: TX Power setting (PR #960 | by @LeeroysHub)
|
||||||
* JS: feat: add IR capabilities to the JS engine (PR #957 | by @LuisMayo)
|
* JS: feat: add IR capabilities to the JS engine (PR #957 | by @LuisMayo)
|
||||||
* NFC: Handle PPS request in ISO14443-4 layer (by @WillyJL)
|
* NFC: Handle PPS request in ISO14443-4 layer (by @WillyJL)
|
||||||
* NFC: Fixes to `READ_MULTI` and `GET_BLOCK_SECURITY` commands in ISO 15693-3 emulation (by @WillyJL & @aaronjamt)
|
* NFC: Fixes to `READ_MULTI` and `GET_BLOCK_SECURITY` commands in ISO 15693-3 emulation (by @WillyJL & @aaronjamt)
|
||||||
* Archive: Allow folders to be pinned (by @WillyJL)
|
* Archive: Allow folders to be pinned (by @WillyJL)
|
||||||
* Apps: Build tag (**3feb2026**) - **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev)
|
* Apps: Build tag (**10feb2026**) - **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev)
|
||||||
## Other changes
|
## Other changes
|
||||||
|
* Settings: Storage settings exit scenes properly if used via favourites (fixes issue #951)
|
||||||
|
* LCD: Backlight settings bug fix (PR #962 | by @Dmitry422)
|
||||||
* UI: Various small changes
|
* UI: Various small changes
|
||||||
* Desktop: Disable winter holidays anims
|
* Desktop: Disable winter holidays anims
|
||||||
* OFW PR 4333: NFC: Fix sending 32+ byte ISO 15693-3 commands (by @WillyJL)
|
* OFW PR 4333: NFC: Fix sending 32+ byte ISO 15693-3 commands (by @WillyJL)
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ const char* subghz_txrx_set_preset_internal(
|
|||||||
SubGhzTxRx* instance,
|
SubGhzTxRx* instance,
|
||||||
uint32_t frequency,
|
uint32_t frequency,
|
||||||
uint8_t index,
|
uint8_t index,
|
||||||
uint32_t tx_power) {
|
uint8_t tx_power) {
|
||||||
furi_assert(instance);
|
furi_assert(instance);
|
||||||
|
|
||||||
//Grab the prset name.
|
//Grab the prset name.
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ void subghz_txrx_set_preset(
|
|||||||
* @param preset_data_size Size of preset data
|
* @param preset_data_size Size of preset data
|
||||||
* @param tx_power Menu Index of TX Power Setting. (Saves iterating in Config enter)
|
* @param tx_power Menu Index of TX Power Setting. (Saves iterating in Config enter)
|
||||||
*/
|
*/
|
||||||
uint8_t*
|
uint8_t* subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint8_t tx_power);
|
||||||
subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint32_t tx_power);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name of preset
|
* Get name of preset
|
||||||
@@ -377,4 +376,4 @@ const char* subghz_txrx_set_preset_internal(
|
|||||||
SubGhzTxRx* instance,
|
SubGhzTxRx* instance,
|
||||||
uint32_t frequency,
|
uint32_t frequency,
|
||||||
uint8_t index,
|
uint8_t index,
|
||||||
uint32_t tx_power);
|
uint8_t tx_power);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ bool subghz_scene_transmitter_update_data_show(void* context) {
|
|||||||
furi_string_get_cstr(frequency_str),
|
furi_string_get_cstr(frequency_str),
|
||||||
furi_string_get_cstr(modulation_str),
|
furi_string_get_cstr(modulation_str),
|
||||||
subghz_txrx_protocol_is_transmittable(subghz->txrx, false));
|
subghz_txrx_protocol_is_transmittable(subghz->txrx, false));
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
furi_string_free(frequency_str);
|
furi_string_free(frequency_str);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ struct SubGhz {
|
|||||||
|
|
||||||
uint16_t idx_menu_chosen;
|
uint16_t idx_menu_chosen;
|
||||||
SubGhzLoadTypeFile load_type_file;
|
SubGhzLoadTypeFile load_type_file;
|
||||||
uint32_t tx_power;
|
uint8_t tx_power;
|
||||||
void* rpc_ctx;
|
void* rpc_ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -120,10 +120,12 @@ void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count
|
|||||||
1)) {
|
1)) {
|
||||||
flipper_format_rewind(fff_data_file);
|
flipper_format_rewind(fff_data_file);
|
||||||
}
|
}
|
||||||
|
uint32_t tx_power = 0;
|
||||||
if(!flipper_format_read_uint32(
|
if(!flipper_format_read_uint32(
|
||||||
fff_data_file, SUBGHZ_LAST_SETTING_FIELD_TX_POWER, &instance->tx_power, 1)) {
|
fff_data_file, SUBGHZ_LAST_SETTING_FIELD_TX_POWER, &tx_power, 1)) {
|
||||||
flipper_format_rewind(fff_data_file);
|
flipper_format_rewind(fff_data_file);
|
||||||
}
|
}
|
||||||
|
instance->tx_power = (uint8_t)(tx_power & 0xFF);
|
||||||
if(!flipper_format_read_float(
|
if(!flipper_format_read_float(
|
||||||
fff_data_file,
|
fff_data_file,
|
||||||
SUBGHZ_LAST_SETTING_FIELD_HOPPING_THRESHOLD,
|
SUBGHZ_LAST_SETTING_FIELD_HOPPING_THRESHOLD,
|
||||||
@@ -227,8 +229,8 @@ bool subghz_last_settings_save(SubGhzLastSettings* instance) {
|
|||||||
file, SUBGHZ_LAST_SETTING_FIELD_DELETE_OLD, &instance->delete_old_signals, 1)) {
|
file, SUBGHZ_LAST_SETTING_FIELD_DELETE_OLD, &instance->delete_old_signals, 1)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!flipper_format_write_uint32(
|
uint32_t tx_power = instance->tx_power;
|
||||||
file, SUBGHZ_LAST_SETTING_FIELD_TX_POWER, &instance->tx_power, 1)) {
|
if(!flipper_format_write_uint32(file, SUBGHZ_LAST_SETTING_FIELD_TX_POWER, &tx_power, 1)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(!flipper_format_write_float(
|
if(!flipper_format_write_float(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ typedef struct {
|
|||||||
bool delete_old_signals;
|
bool delete_old_signals;
|
||||||
float hopping_threshold;
|
float hopping_threshold;
|
||||||
bool leds_and_amp;
|
bool leds_and_amp;
|
||||||
uint32_t tx_power;
|
uint8_t tx_power;
|
||||||
} SubGhzLastSettings;
|
} SubGhzLastSettings;
|
||||||
|
|
||||||
SubGhzLastSettings* subghz_last_settings_alloc(void);
|
SubGhzLastSettings* subghz_last_settings_alloc(void);
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ typedef enum {
|
|||||||
NotificationMessageTypeDelay,
|
NotificationMessageTypeDelay,
|
||||||
|
|
||||||
NotificationMessageTypeLedDisplayBacklight,
|
NotificationMessageTypeLedDisplayBacklight,
|
||||||
|
NotificationMessageTypeLedDisplayBacklightForceOn,
|
||||||
NotificationMessageTypeLedDisplayBacklightEnforceOn,
|
NotificationMessageTypeLedDisplayBacklightEnforceOn,
|
||||||
NotificationMessageTypeLedDisplayBacklightEnforceAuto,
|
NotificationMessageTypeLedDisplayBacklightEnforceAuto,
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ void night_shift_timer_start(NotificationApp* app) {
|
|||||||
if(furi_timer_is_running(app->night_shift_timer)) {
|
if(furi_timer_is_running(app->night_shift_timer)) {
|
||||||
furi_timer_stop(app->night_shift_timer);
|
furi_timer_stop(app->night_shift_timer);
|
||||||
}
|
}
|
||||||
furi_timer_start(app->night_shift_timer, furi_ms_to_ticks(2000));
|
furi_timer_start(app->night_shift_timer, furi_ms_to_ticks(1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,6 +277,12 @@ void night_shift_timer_callback(void* context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force backlight ON when night_shift_demo_timer will be ended
|
||||||
|
void night_shift_demo_timer_callback(void* context) {
|
||||||
|
furi_assert(context);
|
||||||
|
NotificationApp* app = context;
|
||||||
|
notification_message(app, &sequence_display_backlight_force_on);
|
||||||
|
}
|
||||||
// --- NIGHT SHIFT END ---
|
// --- NIGHT SHIFT END ---
|
||||||
|
|
||||||
void notification_message_save_settings(NotificationApp* app) {
|
void notification_message_save_settings(NotificationApp* app) {
|
||||||
@@ -498,6 +504,19 @@ static void notification_process_notification_message(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case NotificationMessageTypeLedDisplayBacklightForceOn:
|
||||||
|
// Force Backlight ON even if its ON now
|
||||||
|
lcd_backlight_is_on = false;
|
||||||
|
notification_apply_notification_led_layer(
|
||||||
|
&app->display,
|
||||||
|
notification_message->data.led.value * display_brightness_setting *
|
||||||
|
app->current_night_shift * 1.0f);
|
||||||
|
reset_mask |= reset_display_mask;
|
||||||
|
lcd_backlight_is_on = true;
|
||||||
|
|
||||||
|
//start rgb_mod_rainbow_timer when display backlight is ON and all corresponding settings is ON too
|
||||||
|
rainbow_timer_starter(app);
|
||||||
|
break;
|
||||||
case NotificationMessageTypeLedDisplayBacklightEnforceOn:
|
case NotificationMessageTypeLedDisplayBacklightEnforceOn:
|
||||||
if(!app->display_led_lock) {
|
if(!app->display_led_lock) {
|
||||||
app->display_led_lock = true;
|
app->display_led_lock = true;
|
||||||
@@ -740,6 +759,9 @@ static bool notification_load_settings(NotificationApp* app) {
|
|||||||
storage_file_free(file);
|
storage_file_free(file);
|
||||||
furi_record_close(RECORD_STORAGE);
|
furi_record_close(RECORD_STORAGE);
|
||||||
|
|
||||||
|
// "kostyl" for update old setting to new without change settings version
|
||||||
|
if(app->settings.display_off_delay_ms < 2000) app->settings.display_off_delay_ms = 2000;
|
||||||
|
|
||||||
return fs_result;
|
return fs_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -925,6 +947,11 @@ int32_t notification_srv(void* p) {
|
|||||||
// define rainbow_timer and they callback
|
// define rainbow_timer and they callback
|
||||||
app->rainbow_timer = furi_timer_alloc(rainbow_timer_callback, FuriTimerTypePeriodic, app);
|
app->rainbow_timer = furi_timer_alloc(rainbow_timer_callback, FuriTimerTypePeriodic, app);
|
||||||
|
|
||||||
|
// define night_shift_demo_timer and they callback.
|
||||||
|
// used for Setting menu to demonstrate night_shift_backlight when user change value
|
||||||
|
app->night_shift_demo_timer =
|
||||||
|
furi_timer_alloc(night_shift_demo_timer_callback, FuriTimerTypeOnce, app);
|
||||||
|
|
||||||
// if rgb_backlight_installed then start rainbow or set leds colors from saved settings (default index = 0)
|
// if rgb_backlight_installed then start rainbow or set leds colors from saved settings (default index = 0)
|
||||||
if(app->settings.rgb.rgb_backlight_installed) {
|
if(app->settings.rgb.rgb_backlight_installed) {
|
||||||
if(app->settings.rgb.rainbow_mode > 0) {
|
if(app->settings.rgb.rainbow_mode > 0) {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ struct NotificationApp {
|
|||||||
NotificationSettings settings;
|
NotificationSettings settings;
|
||||||
|
|
||||||
FuriTimer* night_shift_timer;
|
FuriTimer* night_shift_timer;
|
||||||
|
FuriTimer* night_shift_demo_timer;
|
||||||
float current_night_shift;
|
float current_night_shift;
|
||||||
|
|
||||||
FuriTimer* rainbow_timer;
|
FuriTimer* rainbow_timer;
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ const NotificationMessage message_display_backlight_off = {
|
|||||||
.data.led.value = 0x00,
|
.data.led.value = 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Display: backlight wakeup even if its ON now */
|
||||||
|
const NotificationMessage message_display_backlight_force_on = {
|
||||||
|
.type = NotificationMessageTypeLedDisplayBacklightForceOn,
|
||||||
|
.data.led.value = 0xFF,
|
||||||
|
};
|
||||||
|
|
||||||
/** Display: backlight always on */
|
/** Display: backlight always on */
|
||||||
const NotificationMessage message_display_backlight_enforce_on = {
|
const NotificationMessage message_display_backlight_enforce_on = {
|
||||||
.type = NotificationMessageTypeLedDisplayBacklightEnforceOn,
|
.type = NotificationMessageTypeLedDisplayBacklightEnforceOn,
|
||||||
@@ -259,6 +265,12 @@ const NotificationSequence sequence_display_backlight_off = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Display: backlight wakeup even if its ON now */
|
||||||
|
const NotificationSequence sequence_display_backlight_force_on = {
|
||||||
|
&message_display_backlight_force_on,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
/** Display: backlight always on lock */
|
/** Display: backlight always on lock */
|
||||||
const NotificationSequence sequence_display_backlight_enforce_on = {
|
const NotificationSequence sequence_display_backlight_enforce_on = {
|
||||||
&message_display_backlight_enforce_on,
|
&message_display_backlight_enforce_on,
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ extern const NotificationSequence sequence_display_backlight_on;
|
|||||||
extern const NotificationSequence sequence_display_backlight_off;
|
extern const NotificationSequence sequence_display_backlight_off;
|
||||||
/** Display: backlight force off after a delay of 1000ms */
|
/** Display: backlight force off after a delay of 1000ms */
|
||||||
extern const NotificationSequence sequence_display_backlight_off_delay_1000;
|
extern const NotificationSequence sequence_display_backlight_off_delay_1000;
|
||||||
|
/** Display: backlight wakeup even if its ON now */
|
||||||
|
extern const NotificationSequence sequence_display_backlight_force_on;
|
||||||
/** Display: backlight always on lock */
|
/** Display: backlight always on lock */
|
||||||
extern const NotificationSequence sequence_display_backlight_enforce_on;
|
extern const NotificationSequence sequence_display_backlight_enforce_on;
|
||||||
/** Display: backlight always on unlock */
|
/** Display: backlight always on unlock */
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const float volume_value[VOLUME_COUNT] = {
|
|||||||
#define DELAY_COUNT 12
|
#define DELAY_COUNT 12
|
||||||
const char* const delay_text[DELAY_COUNT] = {
|
const char* const delay_text[DELAY_COUNT] = {
|
||||||
"Always ON",
|
"Always ON",
|
||||||
"1s",
|
"2s",
|
||||||
"5s",
|
"5s",
|
||||||
"10s",
|
"10s",
|
||||||
"15s",
|
"15s",
|
||||||
@@ -100,7 +100,7 @@ const char* const delay_text[DELAY_COUNT] = {
|
|||||||
"30min",
|
"30min",
|
||||||
};
|
};
|
||||||
const uint32_t delay_value[DELAY_COUNT] =
|
const uint32_t delay_value[DELAY_COUNT] =
|
||||||
{0, 1000, 5000, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000, 1800000};
|
{0, 2000, 5000, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000, 1800000};
|
||||||
|
|
||||||
#define VIBRO_COUNT 2
|
#define VIBRO_COUNT 2
|
||||||
const char* const vibro_text[VIBRO_COUNT] = {
|
const char* const vibro_text[VIBRO_COUNT] = {
|
||||||
@@ -295,7 +295,7 @@ static void backlight_changed(VariableItem* item) {
|
|||||||
variable_item_set_current_value_text(item, backlight_text[index]);
|
variable_item_set_current_value_text(item, backlight_text[index]);
|
||||||
app->notification->settings.display_brightness = backlight_value[index];
|
app->notification->settings.display_brightness = backlight_value[index];
|
||||||
|
|
||||||
notification_message(app->notification, &sequence_display_backlight_on);
|
notification_message(app->notification, &sequence_display_backlight_force_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void screen_changed(VariableItem* item) {
|
static void screen_changed(VariableItem* item) {
|
||||||
@@ -557,11 +557,6 @@ static void night_shift_changed(VariableItem* item) {
|
|||||||
|
|
||||||
variable_item_set_current_value_text(item, night_shift_text[index]);
|
variable_item_set_current_value_text(item, night_shift_text[index]);
|
||||||
app->notification->settings.night_shift = night_shift_value[index];
|
app->notification->settings.night_shift = night_shift_value[index];
|
||||||
app->notification->current_night_shift = night_shift_value[index];
|
|
||||||
app->notification->current_night_shift = night_shift_value[index];
|
|
||||||
|
|
||||||
// force demo night_shift brightness to rgb backlight and stock backlight
|
|
||||||
notification_message(app->notification, &sequence_display_backlight_on);
|
|
||||||
|
|
||||||
for(int i = 4; i < 6; i++) {
|
for(int i = 4; i < 6; i++) {
|
||||||
VariableItem* t_item = variable_item_list_get(app->variable_item_list, i);
|
VariableItem* t_item = variable_item_list_get(app->variable_item_list, i);
|
||||||
@@ -572,10 +567,22 @@ static void night_shift_changed(VariableItem* item) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force demo night_shift brightness to rgb backlight and stock backlight for 1,2 sec
|
||||||
|
// while 1,2 seconds are running, there is another timer "night_shift_timer" can change current_night_shift to day or night value
|
||||||
|
// so when night_shift_demo_timer ended backlight force ON to day or night brightness
|
||||||
|
app->notification->current_night_shift = night_shift_value[index];
|
||||||
|
notification_message(app->notification, &sequence_display_backlight_force_on);
|
||||||
|
|
||||||
if(night_shift_value[index] != 1) {
|
if(night_shift_value[index] != 1) {
|
||||||
night_shift_timer_start(app->notification);
|
night_shift_timer_start(app->notification);
|
||||||
|
if(furi_timer_is_running(app->notification->night_shift_demo_timer)) {
|
||||||
|
furi_timer_stop(app->notification->night_shift_demo_timer);
|
||||||
|
}
|
||||||
|
furi_timer_start(app->notification->night_shift_demo_timer, furi_ms_to_ticks(1200));
|
||||||
} else {
|
} else {
|
||||||
night_shift_timer_stop(app->notification);
|
night_shift_timer_stop(app->notification);
|
||||||
|
if(furi_timer_is_running(app->notification->night_shift_demo_timer))
|
||||||
|
furi_timer_stop(app->notification->night_shift_demo_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
notification_message_save_settings(app->notification);
|
notification_message_save_settings(app->notification);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ void power_settings_scene_power_off_on_enter(void* context) {
|
|||||||
dialog, " I will be\nwaiting for\n you here...", 78, 14, AlignLeft, AlignTop);
|
dialog, " I will be\nwaiting for\n you here...", 78, 14, AlignLeft, AlignTop);
|
||||||
dialog_ex_set_icon(dialog, 14, 10, &I_dolph_cry_49x54);
|
dialog_ex_set_icon(dialog, 14, 10, &I_dolph_cry_49x54);
|
||||||
}
|
}
|
||||||
dialog_ex_set_left_button_text(dialog, "Cancel");
|
dialog_ex_set_left_button_text(dialog, "Settings");
|
||||||
dialog_ex_set_right_button_text(dialog, "Power Off");
|
dialog_ex_set_right_button_text(dialog, "Power Off");
|
||||||
dialog_ex_set_result_callback(dialog, power_settings_scene_power_off_dialog_callback);
|
dialog_ex_set_result_callback(dialog, power_settings_scene_power_off_dialog_callback);
|
||||||
dialog_ex_set_context(dialog, app);
|
dialog_ex_set_context(dialog, app);
|
||||||
@@ -42,8 +42,7 @@ bool power_settings_scene_power_off_on_event(void* context, SceneManagerEvent ev
|
|||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
if(event.event == DialogExResultLeft) {
|
if(event.event == DialogExResultLeft) {
|
||||||
if(!scene_manager_previous_scene(app->scene_manager)) {
|
if(!scene_manager_previous_scene(app->scene_manager)) {
|
||||||
scene_manager_stop(app->scene_manager);
|
scene_manager_next_scene(app->scene_manager, PowerSettingsAppSceneStart);
|
||||||
view_dispatcher_stop(app->view_dispatcher);
|
|
||||||
}
|
}
|
||||||
} else if(event.event == DialogExResultRight) {
|
} else if(event.event == DialogExResultRight) {
|
||||||
power_off(app->power);
|
power_off(app->power);
|
||||||
|
|||||||
@@ -156,14 +156,26 @@ bool storage_settings_scene_benchmark_on_event(void* context, SceneManagerEvent
|
|||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
if(app->from_favorites) {
|
||||||
app->scene_manager, StorageSettingsStart);
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||||
|
app->scene_manager, StorageSettingsStart);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if(event.type == SceneManagerEventTypeBack) {
|
} else if(event.type == SceneManagerEventTypeBack) {
|
||||||
if(sd_status == FSE_OK) {
|
if(sd_status == FSE_OK) {
|
||||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
if(app->from_favorites) {
|
||||||
app->scene_manager, StorageSettingsStart);
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||||
|
app->scene_manager, StorageSettingsStart);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
consumed = true;
|
consumed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,13 @@ bool storage_settings_scene_benchmark_confirm_on_event(void* context, SceneManag
|
|||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogExResultRight:
|
case DialogExResultRight:
|
||||||
scene_manager_next_scene(app->scene_manager, StorageSettingsBenchmark);
|
scene_manager_next_scene(app->scene_manager, StorageSettingsBenchmark);
|
||||||
|
|||||||
@@ -44,7 +44,13 @@ bool storage_settings_scene_factory_reset_on_event(void* context, SceneManagerEv
|
|||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
scene_manager_set_scene_state(app->scene_manager, StorageSettingsFactoryReset, 0);
|
scene_manager_set_scene_state(app->scene_manager, StorageSettingsFactoryReset, 0);
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogExResultRight:
|
case DialogExResultRight:
|
||||||
counter++;
|
counter++;
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ bool storage_settings_scene_format_confirm_on_event(void* context, SceneManagerE
|
|||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogExResultRight:
|
case DialogExResultRight:
|
||||||
scene_manager_next_scene(app->scene_manager, StorageSettingsFormatting);
|
scene_manager_next_scene(app->scene_manager, StorageSettingsFormatting);
|
||||||
|
|||||||
@@ -69,8 +69,14 @@ bool storage_settings_scene_formatting_on_event(void* context, SceneManagerEvent
|
|||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
if(app->from_favorites) {
|
||||||
app->scene_manager, StorageSettingsStart);
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||||
|
app->scene_manager, StorageSettingsStart);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if(event.type == SceneManagerEventTypeBack) {
|
} else if(event.type == SceneManagerEventTypeBack) {
|
||||||
|
|||||||
@@ -56,7 +56,13 @@ bool storage_settings_scene_internal_info_on_event(void* context, SceneManagerEv
|
|||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,13 @@ bool storage_settings_scene_sd_info_on_event(void* context, SceneManagerEvent ev
|
|||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogExResultRight:
|
case DialogExResultRight:
|
||||||
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
||||||
|
|||||||
@@ -46,7 +46,13 @@ bool storage_settings_scene_unmount_confirm_on_event(void* context, SceneManager
|
|||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
case DialogExResultLeft:
|
case DialogExResultLeft:
|
||||||
consumed = scene_manager_previous_scene(app->scene_manager);
|
if(app->from_favorites) {
|
||||||
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_previous_scene(app->scene_manager);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DialogExResultRight:
|
case DialogExResultRight:
|
||||||
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
scene_manager_next_scene(app->scene_manager, StorageSettingsUnmounted);
|
||||||
|
|||||||
@@ -57,8 +57,14 @@ bool storage_settings_scene_unmounted_on_event(void* context, SceneManagerEvent
|
|||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case DialogExResultCenter:
|
case DialogExResultCenter:
|
||||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
if(app->from_favorites) {
|
||||||
app->scene_manager, StorageSettingsStart);
|
scene_manager_stop(app->scene_manager);
|
||||||
|
view_dispatcher_stop(app->view_dispatcher);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||||
|
app->scene_manager, StorageSettingsStart);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if(event.type == SceneManagerEventTypeBack) {
|
} else if(event.type == SceneManagerEventTypeBack) {
|
||||||
|
|||||||
@@ -98,7 +98,10 @@ int32_t storage_settings_app(void* p) {
|
|||||||
StorageSettings* app = storage_settings_alloc();
|
StorageSettings* app = storage_settings_alloc();
|
||||||
|
|
||||||
if(!submenu_settings_helpers_app_start(app->settings_helper, p)) {
|
if(!submenu_settings_helpers_app_start(app->settings_helper, p)) {
|
||||||
|
app->from_favorites = false;
|
||||||
scene_manager_next_scene(app->scene_manager, StorageSettingsStart);
|
scene_manager_next_scene(app->scene_manager, StorageSettingsStart);
|
||||||
|
} else {
|
||||||
|
app->from_favorites = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
view_dispatcher_run(app->view_dispatcher);
|
view_dispatcher_run(app->view_dispatcher);
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ typedef struct {
|
|||||||
// helpers
|
// helpers
|
||||||
SubmenuSettingsHelperDescriptor* helper_descriptor;
|
SubmenuSettingsHelperDescriptor* helper_descriptor;
|
||||||
SubmenuSettingsHelper* settings_helper;
|
SubmenuSettingsHelper* settings_helper;
|
||||||
|
|
||||||
|
bool from_favorites;
|
||||||
} StorageSettings;
|
} StorageSettings;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ void subghz_protocol_decoder_power_smart_reset(void* context) {
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool subghz_protocol_power_smart_chek_valid(uint64_t packet) {
|
bool subghz_protocol_power_smart_check_valid(uint64_t packet) {
|
||||||
uint32_t data_1 = (uint32_t)((packet >> 40) & 0xFFFF);
|
uint32_t data_1 = (uint32_t)((packet >> 40) & 0xFFFF);
|
||||||
uint32_t data_2 = (uint32_t)((~packet >> 8) & 0xFFFF);
|
uint32_t data_2 = (uint32_t)((~packet >> 8) & 0xFFFF);
|
||||||
uint8_t data_3 = (uint8_t)(packet >> 32) & 0xFF;
|
uint8_t data_3 = (uint8_t)(packet >> 32) & 0xFF;
|
||||||
@@ -311,7 +311,7 @@ void subghz_protocol_decoder_power_smart_feed(
|
|||||||
}
|
}
|
||||||
if((instance->decoder.decode_data & POWER_SMART_PACKET_HEADER_MASK) ==
|
if((instance->decoder.decode_data & POWER_SMART_PACKET_HEADER_MASK) ==
|
||||||
POWER_SMART_PACKET_HEADER) {
|
POWER_SMART_PACKET_HEADER) {
|
||||||
if(subghz_protocol_power_smart_chek_valid(instance->decoder.decode_data)) {
|
if(subghz_protocol_power_smart_check_valid(instance->decoder.decode_data)) {
|
||||||
instance->generic.data = instance->decoder.decode_data;
|
instance->generic.data = instance->decoder.decode_data;
|
||||||
instance->generic.data_count_bit =
|
instance->generic.data_count_bit =
|
||||||
subghz_protocol_power_smart_const.min_count_bit_for_found;
|
subghz_protocol_power_smart_const.min_count_bit_for_found;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
entry,status,name,type,params
|
entry,status,name,type,params
|
||||||
Version,+,87.5,,
|
Version,+,87.6,,
|
||||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||||
Header,+,applications/services/applications.h,,
|
Header,+,applications/services/applications.h,,
|
||||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||||
@@ -5383,6 +5383,7 @@ Variable,+,sequence_charged,const NotificationSequence,
|
|||||||
Variable,+,sequence_charging,const NotificationSequence,
|
Variable,+,sequence_charging,const NotificationSequence,
|
||||||
Variable,+,sequence_display_backlight_enforce_auto,const NotificationSequence,
|
Variable,+,sequence_display_backlight_enforce_auto,const NotificationSequence,
|
||||||
Variable,+,sequence_display_backlight_enforce_on,const NotificationSequence,
|
Variable,+,sequence_display_backlight_enforce_on,const NotificationSequence,
|
||||||
|
Variable,+,sequence_display_backlight_force_on,const NotificationSequence,
|
||||||
Variable,+,sequence_display_backlight_off,const NotificationSequence,
|
Variable,+,sequence_display_backlight_off,const NotificationSequence,
|
||||||
Variable,+,sequence_display_backlight_off_delay_1000,const NotificationSequence,
|
Variable,+,sequence_display_backlight_off_delay_1000,const NotificationSequence,
|
||||||
Variable,+,sequence_display_backlight_on,const NotificationSequence,
|
Variable,+,sequence_display_backlight_on,const NotificationSequence,
|
||||||
|
|||||||
|
Reference in New Issue
Block a user