From 1251c0af8362ba30068ac95600742a1a3e6b2482 Mon Sep 17 00:00:00 2001 From: MuddledBox <101580720+MuddledBox@users.noreply.github.com> Date: Wed, 16 Mar 2022 02:25:07 -0500 Subject: [PATCH] Removed power 3v3 options (#1022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removed power 3v3 options Per skotopes, "3.3V: this line is used to power SD-Card it is highly unrecommended to turn this line off(power will be re-enabled to scan sdcard). We will remove this command in future releases." So I removed it here. No longer an option and should not be possible. * Added Debug Flag Detect When debug is enabled, "power 3v3" can be used and is shown in the help for "power" menu. When debug is disabled, will not show up and cannot be executed! * Update power_cli.c Co-authored-by: あく --- applications/power/power_cli.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/applications/power/power_cli.c b/applications/power/power_cli.c index c02f124e..f65fb095 100644 --- a/applications/power/power_cli.c +++ b/applications/power/power_cli.c @@ -54,7 +54,9 @@ static void power_cli_command_print_usage() { printf("\treboot2dfu\t - reboot to dfu bootloader\r\n"); printf("\tdebug\t - show debug information\r\n"); printf("\t5v <0 or 1>\t - enable or disable 5v ext\r\n"); - printf("\t3v3 <0 or 1>\t - enable or disable 3v3 ext\r\n"); + if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { + printf("\t3v3 <0 or 1>\t - enable or disable 3v3 ext\r\n"); + } } void power_cli(Cli* cli, string_t args, void* context) { @@ -92,9 +94,11 @@ void power_cli(Cli* cli, string_t args, void* context) { break; } - if(string_cmp_str(cmd, "3v3") == 0) { - power_cli_3v3(cli, args); - break; + if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) { + if(string_cmp_str(cmd, "3v3") == 0) { + power_cli_3v3(cli, args); + break; + } } power_cli_command_print_usage();