Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -rccf1219089b835ab2f9d401c0be0d2000be9010a -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision ccf1219089b835ab2f9d401c0be0d2000be9010a) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,35 +1,41 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * -* @file TaskGeneral.c +* @file TaskGeneral.c * -* @author (last) Quang Nguyen -* @date (last) 25-Aug-2020 +* @author (last) Dong Nguyen +* @date (last) 27-Sep-2022 * -* @author (original) Dara Navaei -* @date (original) 05-Nov-2019 +* @author (original) Dara Navaei +* @date (original) 05-Nov-2019 * ***************************************************************************/ #include "gio.h" #include "lin.h" +#include "AlarmMgmt.h" #include "ConcentratePumps.h" #include "DrainPump.h" #include "Fans.h" -#include "Heaters.h" +#include "Heaters.h" +#include "Integrity.h" +#include "NVDataMgmt.h" #include "OperationModes.h" #include "Reservoirs.h" -#include "ROPump.h" +#include "ROPump.h" +#include "RTC.h" +#include "Switches.h" #include "SystemComm.h" #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "Thermistors.h" -#include "UVReactors.h" +#include "UVReactors.h" +#include "Voltages.h" #include "WatchdogMgmt.h" /** @@ -71,11 +77,23 @@ checkInWithWatchdogMgmt( TASK_GENERAL ); // do this first to keep timing consistent with watchdog management // manage data received from other sub-systems - execSystemCommRx(); + execSystemCommRx(); + // Control and monitor RTC + execRTC(); + +#ifndef BOARD_WITH_NO_HARDWARE // monitor concentrate pumps execConcentratePumpMonitor(); + // Monitor DG voltages + execVoltagesMonitor(); +#endif + + // run operation mode state machine + execOperationModes(); + +#ifndef BOARD_WITH_NO_HARDWARE // Monitor thermistors state machine execThermistors(); @@ -95,18 +113,25 @@ execReservoirs(); // Manage UV reactors controller - execUVReactors(); + execUVReactors(); + + // Manage switches monitor + execSwitches(); -#ifndef DISABLE_HEATERS_AND_TEMPS - // Primary heaters state machine - execPrimaryHeaters(); - - // Trimmer heater state machine - execTrimmerHeater(); -#endif - // run operation mode state machine - execOperationModes(); - + // Heaters controller + execHeaters(); + + // Monitor RAM error status + execRAMMonitor(); +#endif + + // Run non-volatile data management state machine that sends the data record + // to Dialin + execNVDataMgmtProcessRecord(); + + // Run alarm management + execAlarmMgmt(); + // manage data to be transmitted to other sub-systems execSystemCommTx();