Merge remote-tracking branch 'ofw/dev' into js-backport-of-backport

This commit is contained in:
Willy-JL
2024-10-18 04:37:34 +01:00
2 changed files with 14 additions and 1 deletions

View File

@@ -175,6 +175,7 @@
- OFW: Prevent idle priority threads from potentially starving the FreeRTOS idle task (by @CookiePLMonster) - OFW: Prevent idle priority threads from potentially starving the FreeRTOS idle task (by @CookiePLMonster)
- OFW: Wait for RNG ready state and no errors before sampling (by @n1kolasM) - OFW: Wait for RNG ready state and no errors before sampling (by @n1kolasM)
- OFW: A Lot of Fixes (by @skotopes) - OFW: A Lot of Fixes (by @skotopes)
- OFW: CLI: Add warning about stealth mode in vibro command (by @ivanbarsukov)
- OFW: Debug: Use proper hook for handle_exit in flipperapps (by @skotopes) - OFW: Debug: Use proper hook for handle_exit in flipperapps (by @skotopes)
- OFW: API: Fix kerel typo in documentation (by @EntranceJew) - OFW: API: Fix kerel typo in documentation (by @EntranceJew)

View File

@@ -8,6 +8,7 @@
#include <task_control_block.h> #include <task_control_block.h>
#include <time.h> #include <time.h>
#include <notification/notification_messages.h> #include <notification/notification_messages.h>
#include <notification/notification_app.h>
#include <loader/loader.h> #include <loader/loader.h>
#include <lib/toolbox/args.h> #include <lib/toolbox/args.h>
#include <lib/toolbox/strint.h> #include <lib/toolbox/strint.h>
@@ -487,13 +488,24 @@ void cli_command_sysctl(Cli* cli, FuriString* args, void* context) {
void cli_command_vibro(Cli* cli, FuriString* args, void* context) { void cli_command_vibro(Cli* cli, FuriString* args, void* context) {
UNUSED(cli); UNUSED(cli);
UNUSED(context); UNUSED(context);
if(!furi_string_cmp(args, "0")) { if(!furi_string_cmp(args, "0")) {
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION); NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
notification_message_block(notification, &sequence_reset_vibro); notification_message_block(notification, &sequence_reset_vibro);
furi_record_close(RECORD_NOTIFICATION); furi_record_close(RECORD_NOTIFICATION);
} else if(!furi_string_cmp(args, "1")) { } else if(!furi_string_cmp(args, "1")) {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagStealthMode)) {
printf("Flipper is in stealth mode. Unmute the device to control vibration.");
return;
}
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION); NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
notification_message_block(notification, &sequence_set_vibro_on); if(notification->settings.vibro_on) {
notification_message_block(notification, &sequence_set_vibro_on);
} else {
printf("Vibro is disabled in settings. Enable it to control vibration.");
}
furi_record_close(RECORD_NOTIFICATION); furi_record_close(RECORD_NOTIFICATION);
} else { } else {
cli_print_usage("vibro", "<1|0>", furi_string_get_cstr(args)); cli_print_usage("vibro", "<1|0>", furi_string_get_cstr(args));