Ajout config CPU Watchdog dans la page des settings

This commit is contained in:
2023-10-29 15:22:03 -04:00
parent a4028c2385
commit 454935965f
25 changed files with 1189 additions and 101 deletions
+22
View File
@@ -78,6 +78,12 @@ int CSystemConfig::LoadConfig()
//Load CAN Watchdog parameters
*InputStream >> mCANWatchdogParams;
//Load CPU Watchdog parameters
if(FileVersion > 1)
{
*InputStream >> mCPUWatchdogParams;
}
ConfigFile->close();
@@ -133,6 +139,9 @@ int CSystemConfig::SaveConfig()
//Save the CAN Watchdog params
*OutputStream << mCANWatchdogParams;
//Save the CPU Watchdog params
*OutputStream << mCPUWatchdogParams;
ConfigFile->flush();
ConfigFile->close();
@@ -190,6 +199,10 @@ CGeneralSystemParams *CSystemConfig::GetGeneralSystemSettings()
return &mGeneralSystemParams;
}
CCPUWatchdogConfig *CSystemConfig::GetCPUWatchdogSettings()
{
return &mCPUWatchdogParams;
}
int CSystemConfig::SetCANWatchdogConfig(CCANWatchdogConfig *Config)
{
@@ -216,3 +229,12 @@ int CSystemConfig::SetGeneralSystemParams(CGeneralSystemParams *GeneralParams)
mGeneralSystemParams = *GeneralParams;
return RET_OK;
}
int CSystemConfig::SetCPUWatchdogPArams(CCPUWatchdogConfig *CPUWatchdogParams)
{
if(CPUWatchdogParams == 0)
return RET_GENERAL_ERROR;
mCPUWatchdogParams = *CPUWatchdogParams;
return RET_OK;
}