Removed power 3v3 options (#1022)

* 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: あく <alleteam@gmail.com>
This commit is contained in:
MuddledBox 2022-03-16 02:25:07 -05:00 committed by GitHub
parent e0cebb4c1f
commit 1251c0af83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,8 +54,10 @@ static void power_cli_command_print_usage() {
printf("\treboot2dfu\t - reboot to dfu bootloader\r\n"); printf("\treboot2dfu\t - reboot to dfu bootloader\r\n");
printf("\tdebug\t - show debug information\r\n"); printf("\tdebug\t - show debug information\r\n");
printf("\t5v <0 or 1>\t - enable or disable 5v ext\r\n"); printf("\t5v <0 or 1>\t - enable or disable 5v ext\r\n");
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
printf("\t3v3 <0 or 1>\t - enable or disable 3v3 ext\r\n"); printf("\t3v3 <0 or 1>\t - enable or disable 3v3 ext\r\n");
} }
}
void power_cli(Cli* cli, string_t args, void* context) { void power_cli(Cli* cli, string_t args, void* context) {
string_t cmd; string_t cmd;
@ -92,10 +94,12 @@ void power_cli(Cli* cli, string_t args, void* context) {
break; break;
} }
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
if(string_cmp_str(cmd, "3v3") == 0) { if(string_cmp_str(cmd, "3v3") == 0) {
power_cli_3v3(cli, args); power_cli_3v3(cli, args);
break; break;
} }
}
power_cli_command_print_usage(); power_cli_command_print_usage();
} while(false); } while(false);