Index: firmware/.launches/DG.launch
===================================================================
diff -u -reb21c6c63f6c2181a6405cd7c2218b867f4af294 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/.launches/DG.launch (.../DG.launch) (revision eb21c6c63f6c2181a6405cd7c2218b867f4af294)
+++ firmware/.launches/DG.launch (.../DG.launch) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -9,13 +9,17 @@
+
+
+
+
Index: firmware/App/Controllers/Heaters.c
===================================================================
diff -u -r4fdc3246f14c8b3b04724d39803530f60b6caac8 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 4fdc3246f14c8b3b04724d39803530f60b6caac8)
+++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -67,61 +67,61 @@
/// Heaters self-test enums
typedef enum heaters_self_test_states
{
- HEATERS_SELF_TEST_START = 0, ///< Heaters self-test start state
- HEATERS_SELF_TEST_SMALL_PRIMARY_AND_TRIMMER_HEATERS, ///< Heaters self-test small primary and trimmer heaters state
- HEATERS_SELF_TEST_MAIN_PRIMARY_HEATER, ///< Heaters self-test start main primary state
- HEATERS_SELF_TEST_COMPLETE, ///< Heaters self-test complete state
- NUM_OF_HEATERS_SELF_TEST_STATES ///< Number of heaters self-test states
+ HEATERS_SELF_TEST_START = 0, ///< Heaters self-test start state
+ HEATERS_SELF_TEST_SMALL_PRIMARY_AND_TRIMMER_HEATERS, ///< Heaters self-test small primary and trimmer heaters state
+ HEATERS_SELF_TEST_MAIN_PRIMARY_HEATER, ///< Heaters self-test start main primary state
+ HEATERS_SELF_TEST_COMPLETE, ///< Heaters self-test complete state
+ NUM_OF_HEATERS_SELF_TEST_STATES ///< Number of heaters self-test states
} HEATERS_SELF_TEST_STATES_T ;
/// Primary heaters exec states
typedef enum primary_heaters_exec_states
{
- PRIMARY_HEATERS_EXEC_STATE_OFF = 0, ///< Primary heaters exec state off
- PRIMARY_HEATERS_EXEC_STATE_CONTROL_TO_TARGET, ///< Primary heaters exec state control to target (PI controller state)
- NUM_OF_PRIMARY_HEATERS_EXEC_STATES ///< Number of primary heaters exec states
+ PRIMARY_HEATERS_EXEC_STATE_OFF = 0, ///< Primary heaters exec state off
+ PRIMARY_HEATERS_EXEC_STATE_CONTROL_TO_TARGET, ///< Primary heaters exec state control to target (PI controller state)
+ NUM_OF_PRIMARY_HEATERS_EXEC_STATES ///< Number of primary heaters exec states
} PRIMARY_HEATERS_EXEC_STATES_T;
/// Trimmer heater exec states
typedef enum trimmer_heater_exec_states
{
- TRIMMER_HEATER_EXEC_STATE_OFF = 0, ///< Trimmer heater exec state off
- TRIMMER_HEATER_EXEC_STATE_CONTROL_TO_TARGET, ///< Trimmer heater exec state control to target (PI controller state)
- NUM_OF_TRIMMER_HEATER_EXEC_STATES ///< Number of trimmer heater exec states
+ TRIMMER_HEATER_EXEC_STATE_OFF = 0, ///< Trimmer heater exec state off
+ TRIMMER_HEATER_EXEC_STATE_CONTROL_TO_TARGET, ///< Trimmer heater exec state control to target (PI controller state)
+ NUM_OF_TRIMMER_HEATER_EXEC_STATES ///< Number of trimmer heater exec states
} TRIMMER_HEATER_EXEC_STATES_T;
/// Name of the heaters states
typedef enum name_of_heaters
{
- PRIMARY_HEATER = 0, ///< Primary heater
- TRIMMER_HEATER, ///< Trimmer heater
- NUM_OF_HEATERS ///< Number of heaters
+ PRIMARY_HEATER = 0, ///< Primary heater
+ TRIMMER_HEATER, ///< Trimmer heater
+ NUM_OF_HEATERS ///< Number of heaters
} NAME_OF_HEATER_T;
// ********** private data **********
-static SELF_TEST_STATUS_T heatersSelfTestResult; ///< Heaters self-test results.
-static HEATERS_SELF_TEST_STATES_T heatersSelfTestState; ///< Heaters self-test state.
-static PRIMARY_HEATERS_EXEC_STATES_T primaryHeatersExecState; ///< Primary heaters exec state.
-static TRIMMER_HEATER_EXEC_STATES_T trimmerHeaterExecState; ///< Trimmer heater exec state.
+static SELF_TEST_STATUS_T heatersSelfTestResult; ///< Heaters self-test results.
+static HEATERS_SELF_TEST_STATES_T heatersSelfTestState; ///< Heaters self-test state.
+static PRIMARY_HEATERS_EXEC_STATES_T primaryHeatersExecState; ///< Primary heaters exec state.
+static TRIMMER_HEATER_EXEC_STATES_T trimmerHeaterExecState; ///< Trimmer heater exec state.
-static F32 primaryHeaterTargetTemperature; ///< Primary heaters target temperature.
-static F32 trimmerHeaterTargetTemperature; ///< Trimmer heater target temperature.
+static F32 primaryHeaterTargetTemperature; ///< Primary heaters target temperature.
+static F32 trimmerHeaterTargetTemperature; ///< Trimmer heater target temperature.
-static F32 mainPrimaryHeaterDutyCycle; ///< Main primary heater duty cycle.
-static F32 smallPrimaryHeaterDutyCycle; ///< Small primary heater duty cycle.
-static F32 trimmerHeaterDutyCycle; ///< Trimmer heater duty cycle.
-static U32 primaryHeaterTimerCounter; ///< Primary heater timer counter.
-static U32 trimmerHeaterTimerCounter; ///< Trimmer heater timer counter.
-static U32 dataPublicationTimerCounter; ///< Data publication timer counter.
-static BOOL isPrimaryHeaterOn; ///< Flag to show if the primary heater is on.
-static BOOL isTrimmerHeaterOn; ///< Flag to show if the trimmer heater is on.
+static F32 mainPrimaryHeaterDutyCycle; ///< Main primary heater duty cycle.
+static F32 smallPrimaryHeaterDutyCycle; ///< Small primary heater duty cycle.
+static F32 trimmerHeaterDutyCycle; ///< Trimmer heater duty cycle.
+static U32 primaryHeaterTimerCounter; ///< Primary heater timer counter.
+static U32 trimmerHeaterTimerCounter; ///< Trimmer heater timer counter.
+static U32 dataPublicationTimerCounter; ///< Data publication timer counter.
+static BOOL isPrimaryHeaterOn; ///< Flag to show if the primary heater is on.
+static BOOL isTrimmerHeaterOn; ///< Flag to show if the trimmer heater is on.
static OVERRIDE_U32_T heatersDataPublishInterval = { HEATERS_DATA_PUBLISH_INTERVAL,
- HEATERS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Heaters data publish time interval.
-static U32 selfTestElapsedTime; ///< Self-test elapsed time variable.
-static BOOL hasStartPrimaryHeaterRequested; ///< Start primary heater request flag.
-static BOOL hasStartTrimmerHeaterRequested; ///< Start trimmer heater request flag.
+ HEATERS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Heaters data publish time interval.
+static U32 selfTestElapsedTime; ///< Self-test elapsed time variable.
+static BOOL hasStartPrimaryHeaterRequested; ///< Start primary heater request flag.
+static BOOL hasStartTrimmerHeaterRequested; ///< Start trimmer heater request flag.
// ********** private function prototypes **********
Index: firmware/App/Controllers/ROPump.c
===================================================================
diff -u -r79ad3aec7dd37a8acc7ab2391dc9dd806cb9e5cd -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 79ad3aec7dd37a8acc7ab2391dc9dd806cb9e5cd)
+++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -294,7 +294,7 @@
// Read the pressure at the sensor. The pump cannot be more that the maximum allowed pressure
// to make sure the hardware (especially the ROF) is not damaged. If it is the case, we need to stop immediately
- /*F32 actualPressure = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET );
+ F32 actualPressure = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET );
BOOL isPressureMax = actualPressure >= MAX_ALLOWED_MEASURED_PRESSURE_PSI;
checkPersistentAlarm( PERSISTENT_ALARM_RO_PUMP_PRESSURE_OUT_OF_RANGE, isPressureMax, actualPressure, MAX_ALLOWED_MEASURED_PRESSURE_PSI );
@@ -349,7 +349,7 @@
{
activateSafetyShutdown();
}
- }*/
+ }
// Publish RO pump data on interval
publishROPumpData();
Index: firmware/App/DGCommon.h
===================================================================
diff -u -reb21c6c63f6c2181a6405cd7c2218b867f4af294 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/DGCommon.h (.../DGCommon.h) (revision eb21c6c63f6c2181a6405cd7c2218b867f4af294)
+++ firmware/App/DGCommon.h (.../DGCommon.h) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -32,7 +32,7 @@
#ifndef _RELEASE_
#ifndef _VECTORCAST_
// TODO: Removed debug build flags when release build is ready
-// #define RM46_EVAL_BOARD_TARGET 1
+ #define RM46_EVAL_BOARD_TARGET 1
// #define SIMULATE_UI 1
// #define TASK_TIMING_OUTPUT_ENABLED 1 // re-purposes drain pump enable pin for task timing
// #define DISABLE_HEATERS_AND_TEMPS 1
Index: firmware/App/Modes/ModeInitPOST.c
===================================================================
diff -u -r787312bd901f9c4c9d9e91591ecadca9f22fbeb6 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 787312bd901f9c4c9d9e91591ecadca9f22fbeb6)
+++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -94,7 +94,7 @@
postState = DG_POST_STATE_FPGA;
#ifdef SKIP_POST
postState = DG_POST_STATE_COMPLETED;
- postState = DG_POST_STATE_NVDATAMGMT;
+ postState = DG_POST_STATE_RTC;
#endif
break;
@@ -108,6 +108,11 @@
postState = handlePOSTStatus( testStatus );
break;
+ case DG_POST_STATE_NVDATAMGMT:
+ testStatus = execNVDataMgmtSelfTest();
+ postState = handlePOSTStatus( testStatus );
+ break;
+
case DG_POST_STATE_TEMPERATURE_SENSORS:
testStatus = execTemperatureSensorsSelfTest();
postState = handlePOSTStatus( testStatus );
@@ -155,12 +160,6 @@
break;
#endif
- case DG_POST_STATE_NVDATAMGMT:
- testStatus = execNVDataMgmtSelfTest();
- postState = handlePOSTStatus( testStatus );
- //postState = DG_POST_STATE_COMPLETED;
- break;
-
case DG_POST_STATE_WATCHDOG:
testStatus = execWatchdogTest();
handlePOSTStatus( testStatus ); // ignoring return value because last test
Index: firmware/App/Tasks/TaskGeneral.c
===================================================================
diff -u -rcb586152197059cb52c33474f5b9be0855bbad51 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision cb586152197059cb52c33474f5b9be0855bbad51)
+++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -78,11 +78,12 @@
// Control and monitor RTC
execRTC();
+#ifndef RM46_EVAL_BOARD_TARGET
// monitor concentrate pumps
- //execConcentratePumpMonitor();
+ execConcentratePumpMonitor();
// Monitor thermistors state machine
- //execThermistors();
+ execThermistors();
// manage RO pump
execROPumpController();
@@ -91,16 +92,17 @@
execDrainPumpController();
// manage concentrate pumps
- //execConcentratePumpController();
+ execConcentratePumpController();
// Manage fans controller
- //execFans();
+ execFans();
// manage time-based reservoir tasks
- //execReservoirs();
+ execReservoirs();
// Manage UV reactors controller
- //execUVReactos();
+ execUVReactos();
+#endif
#ifndef DISABLE_HEATERS_AND_TEMPS
// Primary heaters state machine
Index: firmware/App/Tasks/TaskPriority.c
===================================================================
diff -u -rcb586152197059cb52c33474f5b9be0855bbad51 -r5e595c58d494cfd452a8a9e89aec3bb8def793e2
--- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision cb586152197059cb52c33474f5b9be0855bbad51)
+++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 5e595c58d494cfd452a8a9e89aec3bb8def793e2)
@@ -61,37 +61,39 @@
// monitor internal ADC channels
execInternalADC();
-
+
+#ifndef RM46_EVAL_BOARD_TARGET
// monitor pressures
- //execPressures();
+ execPressures();
// monitor load cells
- //execLoadCell();
+ execLoadCell();
#ifndef DISABLE_HEATERS_AND_TEMPS
// Temperature sensors read
//execTemperatureSensors();
#endif
// conductivity sensors read
- //execConductivitySensors();
+ execConductivitySensors();
// control valves
- //execValves();
+ execValves();
#ifndef DISABLE_ACCELS
// monitor accelerometer
execAccel();
#endif
// monitor RO pump
- //execROPumpMonitor();
+ execROPumpMonitor();
// monitor drain pump
- //execDrainPumpMonitor();
+ execDrainPumpMonitor();
// Heaters monitor
- //execHeatersMonitor(); */
+ execHeatersMonitor();
+#endif
// 2nd pass for FPGA
execFPGAOut();