Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r2892e3f528d76f45719b7124358e9d242bf27172 -r9c785a779da348df1c066ae0da2d0f53de7ea936 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 2892e3f528d76f45719b7124358e9d242bf27172) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 9c785a779da348df1c066ae0da2d0f53de7ea936) @@ -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 4 ///< Blood leak zero sensor sequence length. +#define BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH 5 ///< 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,6 +109,7 @@ // 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 }; @@ -412,7 +413,7 @@ state = BLOOD_LEAK_ZERO_STATE; bloodLeakZeroRequested = FALSE; - //setFPGABloodLeakZero(); // TODO check if this is needed + setFPGABloodLeakZero(); // TODO check if this is needed bloodLeakZeroStartTime = getMSTimerCount(); } @@ -431,11 +432,11 @@ { BLOOD_LEAK_STATES_T state = BLOOD_LEAK_ZERO_STATE; - if ( bloodLeakUARTCmdIndex < BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH ) + /*if ( bloodLeakUARTCmdIndex < BLOOD_LEAK_ZERO_SENSOR_SEQ_LENGTH ) { U08 command = BLOOD_LEAK_ZERO_SNSR_SEQUENCE[ bloodLeakUARTCmdIndex ]; - if ( bloodLeakUARTCmdIndex <= 1) //BLOOD_LEAK_ZERO_FIFO_STOP_INDEX ) + if ( bloodLeakUARTCmdIndex <= BLOOD_LEAK_ZERO_FIFO_STOP_INDEX ) { setFPGABloodLeakUARTTransmit( (U08)command ); } @@ -446,7 +447,7 @@ bloodLeakUARTCmdIndex++; } - else + else*/ { if ( TRUE == FPGABloodLeakZeroDetected() ) { @@ -460,7 +461,6 @@ { if ( TRUE == didTimeout( bloodLeakZeroStartTime, BLOOD_LEAK_TIMEOUT_MS ) ) { - BOOL test = FALSE; #ifndef IGNORE_BLOOD_LEAK_ALARM activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_FAULT ); #endif @@ -564,7 +564,7 @@ state = BLOOD_LEAK_ZERO_STATE; bloodLeakZeroRequested = FALSE; - //setFPGABloodLeakZero(); // TODO is this needed + setFPGABloodLeakZero(); // TODO is this needed bloodLeakZeroStartTime = getMSTimerCount(); }