- flashtool.cpp: align more to Ni

This commit is contained in:
GetAway
2022-10-06 21:55:33 +02:00
parent 1ab1ff980a
commit 94ee52dbcb
5 changed files with 23 additions and 2 deletions

View File

@@ -230,6 +230,12 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
return false;
}
if(statusViewer) {
statusViewer->showLocalStatus(0);
statusViewer->showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_ENTER_FLASH_SCRIPT)); // UTF-8
}
stopDaemons();
if(statusViewer) {
statusViewer->showLocalStatus(0);
statusViewer->showStatusMessageUTF(g_Locale->getText(LOCALE_FLASHUPDATE_ERASING)); // UTF-8
@@ -336,6 +342,17 @@ bool CFlashTool::getInfo()
return true;
}
void CFlashTool::stopDaemons()
{
/*
#ifdef ENABLE_LCD4LINUX
if (g_settings.lcd4l_support)
CLCD4l::getInstance()->StopLCD4l();
#endif
*/
CNeutrinoApp::getInstance()->stopDaemonsForFlash();
}
bool CFlashTool::erase(int globalProgressEnd)
{
erase_info_t lerase;
@@ -353,8 +370,6 @@ bool CFlashTool::erase(int globalProgressEnd)
return false;
}
CNeutrinoApp::getInstance()->stopDaemonsForFlash();
#ifndef VFD_UPDATE
CVFD::getInstance()->ShowText("Erase Flash");
#endif
@@ -436,7 +451,9 @@ bool CFlashTool::check_md5( const std::string & filename, const std::string & sm
void CFlashTool::reboot()
{
printf("CFlashTool::reboot: start\n");
::reboot(RB_AUTOBOOT);
printf("CFlashTool::reboot: done\n");
::exit(0);
}

View File

@@ -53,6 +53,7 @@ class CFlashTool
bool getInfo();
bool erase(int globalProgressEnd=-1);
void stopDaemons();
public:
CFlashTool();

View File

@@ -737,6 +737,7 @@ typedef enum
LOCALE_FLASHUPDATE_CURRENTVERSION_SEP,
LOCALE_FLASHUPDATE_CURRENTVERSIONDATE,
LOCALE_FLASHUPDATE_CURRENTVERSIONTIME,
LOCALE_FLASHUPDATE_ENTER_FLASH_SCRIPT,
LOCALE_FLASHUPDATE_ERASEFAILED,
LOCALE_FLASHUPDATE_ERASING,
LOCALE_FLASHUPDATE_EXPERIMENTALIMAGE,

View File

@@ -737,6 +737,7 @@ const char * locale_real_names[] =
"flashupdate.currentversion_sep",
"flashupdate.currentversiondate",
"flashupdate.currentversiontime",
"flashupdate.enter_flash_script",
"flashupdate.erasefailed",
"flashupdate.erasing",
"flashupdate.experimentalimage",