AT command firmware for MultiTech Dot devices.
Fork of mDot_AT_firmware by
CmdRepairFlash.cpp
00001 #include "CmdRepairFlash.h" 00002 00003 CmdRepairFlash::CmdRepairFlash() : 00004 #if MTS_CMD_TERM_VERBOSE 00005 Command("Repair Flash Filesystem", "AT+REPAIR", "Repair file system", "1") 00006 #else 00007 Command("AT+REPAIR") 00008 #endif 00009 { 00010 _queryable = false; 00011 } 00012 00013 uint32_t CmdRepairFlash::action(const std::vector<std::string>& args) 00014 { 00015 #if defined(TARGET_MTS_MDOT_F411RE) 00016 logWarning("Repairing flash, do not reset device, please wait..."); 00017 CommandTerminal::Serial()->writef("Repairing flash, do not reset device, please wait...\r\n"); 00018 CommandTerminal::Dot()->repairFlashFileSystem(); 00019 CommandTerminal::Serial()->writef("Repairs completed\r\n"); 00020 #endif 00021 return 0; 00022 } 00023 00024 bool CmdRepairFlash::verify(const std::vector<std::string>& args) 00025 { 00026 if (args.size() == 2 && args[1] == "1") 00027 return true; 00028 00029 #if MTS_CMD_TERM_VERBOSE 00030 CommandTerminal::setErrorMessage("All files will be erased, please provide parameter of '1' to confirm"); 00031 #endif 00032 return false; 00033 }
Generated on Wed Dec 6 2023 19:34:05 by 1.7.2