Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r4cfe2a27c1c066fa8bda9689c28aec895d7de84b -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 4cfe2a27c1c066fa8bda9689c28aec895d7de84b) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -57,7 +57,7 @@ #define BLOOD_LEAK_MIN_WAIT_TIME_2_GET_CAL_MS ( 2 * MS_PER_SECOND ) ///< Blood leak minimum wait time to get calibration in milliseconds. // TODO remove after zeroing was fixed -#define BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH 5 ///< Blood leak zero sensor sequence length. +#define BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH 4 ///< Blood leak zero sensor sequence length. #define BLOOD_LEAK_ZERO_Z_CHAR_ASCII 90 ///< Blood leak zero sensor 'Z' command in ascii. #define BLOOD_LEAK_ZERO_FIFO_STOP_INDEX 2 ///< Blood leak zero sensor stop writing to FIFO command. // TODO remove after zeroing was fixed @@ -109,7 +109,6 @@ // TODO remove after zeroing was fixed /// Blood leak zero sensor sequence array. static const U08 BLOOD_LEAK_ZERO_SNSR_SEQUENCE[ BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH ] = { BLOOD_LEAK_ZERO_Z_CHAR_ASCII, - BLOOD_LEAK_CARRIAGE_RETURN_ASCII, BLOOD_LEAK_STOP_WRITE_FIFO_COMMAND, BLOOD_LEAK_UART_COMM_ACTIVE_HIGH, BLOOD_LEAK_UART_COMM_ACTIVE_LOW }; @@ -337,7 +336,9 @@ } else { +#ifndef IGNORE_BLOOD_LEAK_ALARM activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_SENSOR_SET_POINT_SET_FAILURE ); +#endif } } else @@ -434,7 +435,7 @@ { U08 command = BLOOD_LEAK_ZERO_SNSR_SEQUENCE[ bloodLeakUARTCmdIndex ]; - if ( bloodLeakUARTCmdIndex <= BLOOD_LEAK_ZERO_FIFO_STOP_INDEX ) + if ( bloodLeakUARTCmdIndex <= 1) //BLOOD_LEAK_ZERO_FIFO_STOP_INDEX ) { setFPGABloodLeakUARTTransmit( (U08)command ); } @@ -459,6 +460,7 @@ { if ( TRUE == didTimeout( bloodLeakZeroStartTime, BLOOD_LEAK_TIMEOUT_MS ) ) { + BOOL test = FALSE; #ifndef IGNORE_BLOOD_LEAK_ALARM activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_FAULT ); #endif Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -r61716bc97ecca8af1ec560333844a8cf602eccb0 -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision 61716bc97ecca8af1ec560333844a8cf602eccb0) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -88,6 +88,12 @@ static OVERRIDE_U32_T fansPublishInterval = { FANS_DATA_PUBLISH_INTERVAL, FANS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Fans publish time interval override +// TODO for testing remove +BOOL isTest = FALSE; +U32 alarmTime = 0; +U32 alarmElapsed = 0; +// TODO for testing remove + static FANS_EXEC_STATES_T handleExecStateWaitForPOST( void ); static FANS_EXEC_STATES_T handleExecStateRun( void ); @@ -135,6 +141,12 @@ fansStatus.rpm[ fan ].override = OVERRIDE_RESET; } + // TODO for testing remove + isTest = FALSE; + alarmTime = 0; + alarmElapsed = 0; + // TODO for testing remove + // Initialize a persistent alarm for fans RPM out of range initPersistentAlarm( ALARM_ID_HD_FAN_RPM_OUT_OF_RANGE, FANS_MAX_ALLOWED_RPM_OUT_OF_RANGE_INTERVAL, FANS_MAX_ALLOWED_RPM_OUT_OF_RANGE_INTERVAL ); } @@ -427,6 +439,17 @@ { rpm = getMeasuredFanRPM( fan ); isFanRPMOutOfRange |= ( ( rpm < fansMinAllowedRPM ) || ( rpm > fansMaxAllowedRPM ) ? TRUE : FALSE ); + + // TODO test code + if ( (TRUE == isFanRPMOutOfRange) && (alarmTime == 0) ) + { + alarmTime = getMSTimerCount(); + } + else if ( FALSE == isFanRPMOutOfRange) + { + alarmTime = 0; + } + // TODO test code } if ( FALSE == hasAlarmBeenRaised ) @@ -438,6 +461,8 @@ SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_FAN_RPM_OUT_OF_RANGE, rpm ) // Set the alarm flag to TRUE hasAlarmBeenRaised = TRUE; + + alarmElapsed = calcTimeSince(alarmTime); // TODO test code } // If the alarm has been raised but the start time of the alarm has not been set, set the alarm start timer if ( ( TRUE == hasAlarmBeenRaised ) && ( 0 == rpmAlarmStartTime ) ) @@ -511,6 +536,7 @@ data.fansTargetRPM = fansStatus.targetRPM; data.fanInlet1RPM = getMeasuredFanRPM( FAN_INLET_1 ); data.rpmAlarmTimeOffset = getRPMAlarmStartTimeOffset(); + data.alarmElapsedTime = alarmElapsed; broadcastData( MSG_ID_HD_FANS_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&data, sizeof( FANS_DATA_T ) ); Index: firmware/App/Controllers/Fans.h =================================================================== diff -u -r61716bc97ecca8af1ec560333844a8cf602eccb0 -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/Controllers/Fans.h (.../Fans.h) (revision 61716bc97ecca8af1ec560333844a8cf602eccb0) +++ firmware/App/Controllers/Fans.h (.../Fans.h) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -42,6 +42,7 @@ F32 fansTargetRPM; ///< Fans target RPM F32 fanInlet1RPM; ///< Fan inlet 1 RPM U32 rpmAlarmTimeOffset; ///< RPM alarm time offset + U32 alarmElapsedTime; } FANS_DATA_T; void initFans( void ); Index: firmware/App/Drivers/Battery.c =================================================================== diff -u -r24b2fe72608344e67ef37234085d15ad5e4fcc37 -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/Drivers/Battery.c (.../Battery.c) (revision 24b2fe72608344e67ef37234085d15ad5e4fcc37) +++ firmware/App/Drivers/Battery.c (.../Battery.c) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -134,7 +134,7 @@ batteryRelStateOfCharge_pct.data = (U32)relStateOfCharge_pct; if ( getBatteryRemainingPercent() < BATTERY_PACK_MIN_CHARGE_PCT ) { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BATTERY_PACK_CHARGE_TOO_LOW, getBatteryRemainingPercent() ); + //SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BATTERY_PACK_CHARGE_TOO_LOW, getBatteryRemainingPercent() ); // DEBUG_DENALI } else { Index: firmware/App/HDCommon.h =================================================================== diff -u -r494828bba7e66a82f498a0fee6f370e387f99fb9 -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 494828bba7e66a82f498a0fee6f370e387f99fb9) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -54,7 +54,7 @@ #define DISABLE_PUMP_FLOW_CHECKS 1 // Do not error on HD pump flow checks #define DISABLE_PUMP_SPEED_CHECKS 1 // Do not error on HD pump speed checks #define DISABLE_PUMP_DIRECTION_CHECKS 1 // Do not error on HD pump direction checks -// #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality + #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality #define ALWAYS_ALLOW_SYRINGE_PUMP_CMDS 1 // Allow syringe pump commands at any time except when pump is busy #define DISABLE_PRESSURE_CHECKS 1 // Do not error on HD pressure checks #define DISABLE_ARTERIAL_PRESSURE_CHECK 1 // Do not error on arterial pressure out of range @@ -76,7 +76,7 @@ // #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters #define DISABLE_VOLTAGE_MONITOR 1 // Disable voltage monitoring/alarms #define ALLOW_1_MIN_TREATMENT_DURATION 1 // Allow user to change treatment duration to as low as 1 minute -// #define DISABLE_SYRINGE_PUMP_ALARMS 1 // Disable some syringe pump alarms that are triggering intermittently + #define DISABLE_SYRINGE_PUMP_ALARMS 1 // Disable some syringe pump alarms that are triggering intermittently // #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps // #define DISABLE_BUBBLE_ALARMS 1 // Disable bubble alarms #define DISABLE_UI_POST_TEST 1 // Disable the UI POST @@ -88,12 +88,12 @@ #define IGNORE_BLOOD_LEAK_ALARM 1 // Ignore blood leak alarm // Skip Pre-Treatment and get to treatment as soon as possible -// #define SKIP_UI_INTERACTION 1 // Skip UI interaction. + #define SKIP_UI_INTERACTION 1 // Skip UI interaction. #define SKIP_SAMPLE_WATER 1 // Skip pre-treatment sample water #define SKIP_CONSUMABLE_TESTS 1 // Skip pre-treatment consumable Self-tests #define SKIP_DRY_SELF_TESTS 1 // Skip pre-treatment dry self-tests -// #define SKIP_PRIMING 1 // Skip Pre-treatment Prime -// #define SKIP_WET_SELF_TESTS 1 // Skip Pre-treatment prime wet self-tests + #define SKIP_PRIMING 1 // Skip Pre-treatment Prime + #define SKIP_WET_SELF_TESTS 1 // Skip Pre-treatment prime wet self-tests #include #include Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r24b2fe72608344e67ef37234085d15ad5e4fcc37 -r2892e3f528d76f45719b7124358e9d242bf27172 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 24b2fe72608344e67ef37234085d15ad5e4fcc37) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 2892e3f528d76f45719b7124358e9d242bf27172) @@ -31,7 +31,9 @@ #include "SystemComm.h" #include "Valves.h" #include "WatchdogMgmt.h" -#include "TaskPriority.h" +#include "TaskPriority.h" + +#include "Fans.h" /** * @addtogroup TaskPriority