From 38326877eab18cb3c4150df51c32afe5ed459f0b Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:19:12 +0300 Subject: [PATCH 1/5] add input events sub check [ci skip] --- applications/services/desktop/desktop.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/applications/services/desktop/desktop.c b/applications/services/desktop/desktop.c index 9366d6508..abe7d69bc 100644 --- a/applications/services/desktop/desktop.c +++ b/applications/services/desktop/desktop.c @@ -214,8 +214,10 @@ static void desktop_stop_auto_lock_timer(Desktop* desktop) { static void desktop_auto_lock_arm(Desktop* desktop) { if(desktop->settings.auto_lock_delay_ms) { - desktop->input_events_subscription = furi_pubsub_subscribe( - desktop->input_events_pubsub, desktop_input_event_callback, desktop); + if(!desktop->input_events_subscription) { + desktop->input_events_subscription = furi_pubsub_subscribe( + desktop->input_events_pubsub, desktop_input_event_callback, desktop); + } desktop_start_auto_lock_timer(desktop); } } @@ -246,8 +248,10 @@ static void desktop_stop_auto_poweroff_timer(Desktop* desktop) { static void desktop_auto_poweroff_arm(Desktop* desktop) { if(desktop->settings.auto_poweroff_delay_ms) { - desktop->input_events_subscription = furi_pubsub_subscribe( - desktop->input_events_pubsub, desktop_input_event_callback, desktop); + if(desktop->input_events_subscription) { + desktop->input_events_subscription = furi_pubsub_subscribe( + desktop->input_events_pubsub, desktop_input_event_callback, desktop); + } desktop_start_auto_poweroff_timer(desktop); } } From 4694492ed4c68c5660e10e60c32cb4f89e76de18 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:03:53 +0300 Subject: [PATCH 2/5] upd changelog --- CHANGELOG.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f12e3bd56..122f5ccf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,24 @@ ## Main changes -- Current API: 78.2 +- Current API: 79.1 * SubGHz: Jolly Motors support (with add manually) (Thanks @pkooiman !) * Desktop: Auto Power Off Timer (by @Dmitry422 with some fixes by @xMasterX) * OFW PR 4025: Increase system stack's reserved memory size (Fix USB UART Bridge Crash) (by @Astrrra) * OFW: merged gsurkov/vcp_break_support branch for usb uart bridge (WIP!!!) * Apps: **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev) ## Other changes +* Desktop: Add input events sub check +* OFW: Fix invalid path errors while deploying SDK by enforcing toolchain to use UTF-8 on initial SDK Extraction +* OFW: **Added flipper_format_write_empty_line(...)** +* OFW: Fix skylander ID reading +* OFW: Work around incorrect serial port handling by the OS +* OFW: Add winter animations +* OFW: FBT: Don't lint JS packages +* OFW: **Fix lost BadBLE keystrokes** +* OFW: **Loader: Fix BusFault in handling of OOM** (was already included in previous UL release) +* OFW: **NFC Fix ISO15693 stucking in wrong mode.** +* OFW: Update `infrared_test.c` reference +* OFW: **FuriThread stdin** +* OFW: **Add the ability to send a signal once via RPC** * OFW: NFC: Plantain parser Last payment amount fix * OFW: NFC clipper: BART station ids for San Lorenzo, Bay Fair * OFW: Fix typo for mf_classic_key_cahce_get_next_key() function From 1739f57c7a9f0e95079870c43c9eb5a238663d84 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 24 Dec 2024 01:02:05 +0300 Subject: [PATCH 3/5] enable anim --- assets/dolphin/external/manifest.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/dolphin/external/manifest.txt b/assets/dolphin/external/manifest.txt index 32295b50b..7e8bee083 100644 --- a/assets/dolphin/external/manifest.txt +++ b/assets/dolphin/external/manifest.txt @@ -225,6 +225,13 @@ Min level: 1 Max level: 3 Weight: 4 +Name: L1_New_year_128x64 +Min butthurt: 0 +Max butthurt: 14 +Min level: 1 +Max level: 3 +Weight: 4 + Name: L3_Fireplace_128x64 Min butthurt: 0 Max butthurt: 13 From 7fc34db57b40b58404910a0eeef87dffbea40729 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:04:34 +0300 Subject: [PATCH 4/5] use event system --- applications/services/desktop/desktop.c | 12 ++++++++---- applications/services/desktop/views/desktop_events.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/applications/services/desktop/desktop.c b/applications/services/desktop/desktop.c index abe7d69bc..d77be68a0 100644 --- a/applications/services/desktop/desktop.c +++ b/applications/services/desktop/desktop.c @@ -156,7 +156,11 @@ static bool desktop_custom_event_callback(void* context, uint32_t event) { if(!desktop->app_running && !desktop->locked) { desktop_lock(desktop); } - + } else if(event == DesktopGlobalAutoPowerOff) { + if(!desktop->app_running) { + Power* power = furi_record_open(RECORD_POWER); + power_off(power); + } } else if(event == DesktopGlobalSaveSettings) { desktop_settings_save(&desktop->settings); desktop_apply_settings(desktop); @@ -232,9 +236,9 @@ static void desktop_auto_lock_inhibit(Desktop* desktop) { //--- auto_power_off_timer static void desktop_auto_poweroff_timer_callback(void* context) { - UNUSED(context); - Power* power = furi_record_open(RECORD_POWER); - power_off(power); + furi_assert(context); + Desktop* desktop = context; + view_dispatcher_send_custom_event(desktop->view_dispatcher, DesktopGlobalAutoPowerOff); } static void desktop_start_auto_poweroff_timer(Desktop* desktop) { diff --git a/applications/services/desktop/views/desktop_events.h b/applications/services/desktop/views/desktop_events.h index ba91a30cc..57cc0fdaa 100644 --- a/applications/services/desktop/views/desktop_events.h +++ b/applications/services/desktop/views/desktop_events.h @@ -62,4 +62,5 @@ typedef enum { DesktopGlobalApiUnlock, DesktopGlobalSaveSettings, DesktopGlobalReloadSettings, + DesktopGlobalAutoPowerOff, } DesktopEvent; From 1a95757a75f42054b88c6bb9dcb44227175d1a42 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:23:07 +0300 Subject: [PATCH 5/5] upd changelog --- CHANGELOG.md | 10 ++++++---- applications/services/desktop/desktop.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 122f5ccf2..245ffe0de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,26 @@ ## Main changes -- Current API: 79.1 +- Current API: 79.2 * SubGHz: Jolly Motors support (with add manually) (Thanks @pkooiman !) * Desktop: Auto Power Off Timer (by @Dmitry422 with some fixes by @xMasterX) +* OFW: **Fix lost BadBLE keystrokes** +* OFW: **Add the ability to send a signal once via RPC** * OFW PR 4025: Increase system stack's reserved memory size (Fix USB UART Bridge Crash) (by @Astrrra) * OFW: merged gsurkov/vcp_break_support branch for usb uart bridge (WIP!!!) * Apps: **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev) ## Other changes -* Desktop: Add input events sub check +* Desktop: Add input events sub check & use event system for auto power off +* OFW: Bump cross-spawn in /applications/system/js_app/packages/create-fz-app +* OFW: **Pipe** (new api funcs) * OFW: Fix invalid path errors while deploying SDK by enforcing toolchain to use UTF-8 on initial SDK Extraction * OFW: **Added flipper_format_write_empty_line(...)** * OFW: Fix skylander ID reading * OFW: Work around incorrect serial port handling by the OS * OFW: Add winter animations * OFW: FBT: Don't lint JS packages -* OFW: **Fix lost BadBLE keystrokes** * OFW: **Loader: Fix BusFault in handling of OOM** (was already included in previous UL release) * OFW: **NFC Fix ISO15693 stucking in wrong mode.** * OFW: Update `infrared_test.c` reference * OFW: **FuriThread stdin** -* OFW: **Add the ability to send a signal once via RPC** * OFW: NFC: Plantain parser Last payment amount fix * OFW: NFC clipper: BART station ids for San Lorenzo, Bay Fair * OFW: Fix typo for mf_classic_key_cahce_get_next_key() function diff --git a/applications/services/desktop/desktop.c b/applications/services/desktop/desktop.c index d77be68a0..59c5290f4 100644 --- a/applications/services/desktop/desktop.c +++ b/applications/services/desktop/desktop.c @@ -252,7 +252,7 @@ static void desktop_stop_auto_poweroff_timer(Desktop* desktop) { static void desktop_auto_poweroff_arm(Desktop* desktop) { if(desktop->settings.auto_poweroff_delay_ms) { - if(desktop->input_events_subscription) { + if(!desktop->input_events_subscription) { desktop->input_events_subscription = furi_pubsub_subscribe( desktop->input_events_pubsub, desktop_input_event_callback, desktop); }