summaryrefslogtreecommitdiff
path: root/src/app_console/app_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_console/app_console.cpp')
-rw-r--r--src/app_console/app_console.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp
index f6b23215..9aff20dc 100644
--- a/src/app_console/app_console.cpp
+++ b/src/app_console/app_console.cpp
@@ -483,7 +483,7 @@ void RegisterBtList() {
}
int CmdSamd(int argc, char** argv) {
- static const std::string usage = "usage: samd [flash|charge]";
+ static const std::string usage = "usage: samd [flash|charge|off]";
if (argc != 2) {
std::cout << usage << std::endl;
return 1;
@@ -493,7 +493,6 @@ int CmdSamd(int argc, char** argv) {
if (cmd == "flash") {
std::cout << "resetting samd..." << std::endl;
vTaskDelay(pdMS_TO_TICKS(5));
-
AppConsole::sSamd->ResetToFlashSamd();
} else if (cmd == "charge") {
auto res = AppConsole::sSamd->GetChargeStatus();
@@ -521,6 +520,10 @@ int CmdSamd(int argc, char** argv) {
} else {
std::cout << "unknown" << std::endl;
}
+ } else if (cmd == "off") {
+ std::cout << "bye !!!" << std::endl;
+ vTaskDelay(pdMS_TO_TICKS(5));
+ AppConsole::sSamd->PowerDown();
} else {
std::cout << usage << std::endl;
return 1;