Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -r54f45c387430e440ab4607451fc84dea61f273f1 -r38dba816c24745193bc78134920e558adf53eff4 --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 54f45c387430e440ab4607451fc84dea61f273f1) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 38dba816c24745193bc78134920e558adf53eff4) @@ -18,14 +18,16 @@ #include "gio.h" #include "lin.h" -#include "DrainPump.h" +#include "DrainPump.h" +#include "Fans.h" #include "Heaters.h" #include "OperationModes.h" #include "Reservoirs.h" #include "ROPump.h" #include "SystemComm.h" #include "SystemCommMessages.h" -#include "TaskGeneral.h" +#include "TaskGeneral.h" +#include "Thermistors.h" #include "WatchdogMgmt.h" /** @@ -56,31 +58,49 @@ // SET_TASK_ON(); // TODO - uncomment and define TASK_TIMING_OUTPUT_ENABLED to monitor this tasks timing #endif + /* Order of exec functions + * 1. Comm Rx + * 2. Monitors + * 3. Op modes + * 4. Controllers + * 5. Comm Tx + * */ + // check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL ); // do this first to keep timing consistent with watchdog management // manage data received from other sub-systems - execSystemCommRx(); + execSystemCommRx(); + + // Monitor thermistors state machine + execThermistors(); + + // run operation mode state machine + execOperationModes(); + + // manage time-based reservoir tasks + execReservoirs(); + + // manage RO pump + execROPumpController(); + + // manage drain pump + execDrainPumpController(); + + // Manage fans controller + execFans(); + + // Manage UV reactors controller + execUVReactors(); - // manage RO pump - execROPumpController(); - - // manage drain pump - execDrainPumpController(); - - // manage time-based reservoir tasks - execReservoirs(); - #ifndef DISABLE_HEATERS_AND_TEMPS // Primary heaters state machine execPrimaryHeaters(); // Trimmer heater state machine execTrimmerHeater(); #endif - // run operation mode state machine - execOperationModes(); - + // manage data to be transmitted to other sub-systems execSystemCommTx();