Ajout config CPU Watchdog dans la page des settings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user