Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -rd3b7ae356aae29c99cb039713a2e120fdbce5a9c -rd951c4a673f308306d48650182c3af3814e9ab4b --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision d3b7ae356aae29c99cb039713a2e120fdbce5a9c) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision d951c4a673f308306d48650182c3af3814e9ab4b) @@ -429,7 +429,12 @@ *************************************************************************/ BOOL retractSyringePump( void ) { +#ifndef ALWAYS_ALLOW_SYRINGE_PUMP_CMDS if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) && ( heparinDeliveryState != HEPARIN_STATE_OFF ) ) +#else + heparinDeliveryState = HEPARIN_STATE_STOPPED; + if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) ) +#endif { syringePumpSetRate = SYRINGE_PUMP_RETRACT_RATE; syringePumpRetractRequested = TRUE; @@ -825,11 +830,13 @@ if ( syringePumpDACVrefWriteInProgress != TRUE ) { - // Check ADC read is fresh - if ( lastSyringePumpADCReadCtr == adcReadCtr ) // TODO - add persistence +#ifndef USING_DEBUGGER + // Check ADC read is fresh (takes FPGA a while to configure ADC so don't check until after init/POST mode + if ( ( getCurrentOperationMode() > MODE_INIT ) && ( lastSyringePumpADCReadCtr == adcReadCtr ) ) // TODO - add persistence or time window { - // activateAlarmNoData( ALARM_ID_HD_SYRINGE_PUMP_ADC_ERROR ); // TODO - restore when issue with read counter resolved + activateAlarmNoData( ALARM_ID_HD_SYRINGE_PUMP_ADC_ERROR ); } +#endif lastSyringePumpADCReadCtr = adcReadCtr; // Check encoder direction error. // TODO check direction in states