- 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);
}