Index: firmware/App/Controllers/UVReactors.c =================================================================== diff -u -rccf1219089b835ab2f9d401c0be0d2000be9010a -rc48569a478d727afa7cd69aadb396814248c83f9 --- firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision ccf1219089b835ab2f9d401c0be0d2000be9010a) +++ firmware/App/Controllers/UVReactors.c (.../UVReactors.c) (revision c48569a478d727afa7cd69aadb396814248c83f9) @@ -19,7 +19,7 @@ #define INLET_UV_REACTOR_ENABLE_PIN 0 ///< Inlet UV reactor GPIO pin number (enable pin). #define OUTLET_UV_REACTOR_ENABLE_PIN 1 ///< Outlet UV reactor GPIO pin number (enable Pin). -#define INLET_UV_REACTOR_INDICATION_PIN 0x1A ///< Inlet UV reactor N2HET1 pin number (health check). +#define INLET_UV_REACTOR_INDICATION_PIN 0x18 ///< Inlet UV reactor N2HET1 pin number (health check). #define OUTLET_UV_REACTOR_INDICATION_PIN 0x0B ///< Outlet UV reactor N2HET1 pin number (health check). #define UV_REACTORS_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< UV reactors data publication time interval. /// Self test wait time after enabling the reactors and before checking for their health in ms. @@ -93,7 +93,7 @@ { UV_REACTORS_T reactor; - uvReactorsSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; + uvReactorsSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; uvReactorsSelfTestStates = UV_REACTORS_SELF_TEST_OFF; dataPublishCounter = 0; @@ -108,9 +108,9 @@ // Initialize the common values in the UV reactors for( reactor = INLET_UV_REACTOR; reactor < NUM_OF_UV_REACTORS; reactor++ ) { - reactorsStatus[ reactor ].pinSignalState = PIN_SIGNAL_LOW; - reactorsStatus[ reactor ].execState = UV_REACTOR_STATE_OFF; - reactorsStatus[ reactor ].switchState = TURN_OFF; + reactorsStatus[ reactor ].pinSignalState = PIN_SIGNAL_LOW; + reactorsStatus[ reactor ].execState = UV_REACTOR_STATE_OFF; + reactorsStatus[ reactor ].switchState = TURN_OFF; } initPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); @@ -382,7 +382,7 @@ checkPersistentAlarm( ALARM_ID_UV_REACTOR_NOT_HEALTHY, !isReactorHealthy, (U32)reactor, MAX_ALLOWED_UNHEALTHY_REACTOR_PERIOD ); // Check if the alarm has been active - if( isAlarmActive( ALARM_ID_UV_REACTOR_NOT_HEALTHY ) ) + /*if( isAlarmActive( ALARM_ID_UV_REACTOR_NOT_HEALTHY ) ) { reactorsStatus[ reactor ].switchState = TURN_OFF; } @@ -393,7 +393,7 @@ setReactorEnableStatus( reactor, PIN_SIGNAL_LOW ); state = UV_REACTOR_STATE_OFF; - } + }*/ return state; } @@ -411,7 +411,7 @@ static void setReactorEnableStatus( UV_REACTORS_T reactor, PIN_SIGNAL_STATE_T state ) { // Set the GIO pin to enable or disable - gioSetBit( gioPORTA, reactorsStatus[ reactor ].reactorEnablePin, state ); + gioSetBit( gioPORTA, reactorsStatus[ reactor ].reactorEnablePin, (U32)state ); // Update the pin signal state reactorsStatus[ reactor ].pinSignalState = state; @@ -462,10 +462,10 @@ { UV_REACTORS_DATA_T uvReactorsData; // Publish the reactors health status - uvReactorsData.inletUVReactorHealthStatus = reactorsStatus[ INLET_UV_REACTOR ].reactorHealthStatusPin; - uvReactorsData.outletUVReactorHealthStatus = reactorsStatus[ OUTLET_UV_REACTOR ].reactorHealthStatusPin; + uvReactorsData.inletUVReactorHealthStatus = getUVReactorHealth( INLET_UV_REACTOR ); + uvReactorsData.outletUVReactorHealthStatus = getUVReactorHealth( OUTLET_UV_REACTOR ); uvReactorsData.inletUVReactorState = reactorsStatus[ INLET_UV_REACTOR ].execState; - uvReactorsData.outletUVReactorHealthStatus = reactorsStatus[ OUTLET_UV_REACTOR ].execState; + uvReactorsData.outletUVReactorState = reactorsStatus[ OUTLET_UV_REACTOR ].execState; broadcastUVReactorsData( &uvReactorsData );