Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -rfa27f8d2dba32416ff6b310b192b9adb5fee6997 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision fa27f8d2dba32416ff6b310b192b9adb5fee6997) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -355,6 +355,7 @@ accepted = TRUE; heparinDeliveryState = HEPARIN_STATE_PAUSED; stopSyringePump(); + sendTreatmentLogEventData( HEPARIN_PAUSE_RESUME_EVENT, HEPARIN_STATE_DISPENSING, HEPARIN_STATE_PAUSED ); } else { @@ -367,6 +368,7 @@ { accepted = TRUE; startHeparinContinuous(); + sendTreatmentLogEventData( HEPARIN_PAUSE_RESUME_EVENT, HEPARIN_STATE_PAUSED, HEPARIN_STATE_DISPENSING ); } else { Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r69b93e39861c5493d273f25d9e43cacd0b5819e2 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -17,6 +17,7 @@ #include "Accel.h" #include "AlarmLamp.h" +#include "Battery.h" #include "BloodFlow.h" #include "Buttons.h" #include "Compatible.h" @@ -44,6 +45,8 @@ /// Delay (in task intervals) after POST completes. #define POST_COMPLETED_DELAY ( 2 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +/// Maximum wait time for UI to send its final POST result. +#define POST_UI_MAX_WAIT_TIME ( 2 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) // ********** private data ********** @@ -54,13 +57,17 @@ static BOOL uiPOSTPassed; ///< Final result for UI POST tests (TRUE = passed, FALSE = failed). static BOOL dgPOSTPassed; ///< Final result for DG POST tests (TRUE = passed, FALSE = failed). +static BOOL uiPOSTResultReceived; ///< Have we received a final POST result from the UI? +static BOOL dgPOSTResultReceived; ///< Have we received a final POST result from the DG? +static U32 waitForUIPostTimerCtr; ///< Timer counter to limit wait for UI final POST result. static U32 postCompleteDelayTimerCtr; ///< Timer counter for 2 second delay after POST completes and before transitioning to Standbymode. // ********** private function prototypes ********** static HD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); static SELF_TEST_STATUS_T execFWCompatibilityTest( void ); +static SELF_TEST_STATUS_T execUITest( void ); /*********************************************************************//** * @brief @@ -77,6 +84,9 @@ tempPOSTPassed = TRUE; uiPOSTPassed = FALSE; dgPOSTPassed = FALSE; + uiPOSTResultReceived = FALSE; + dgPOSTResultReceived = FALSE; + waitForUIPostTimerCtr = 0; postCompleteDelayTimerCtr = 0; } @@ -114,8 +124,6 @@ // Ignore stop button in this mode. } - // TODO - send POST status on CAN - // Execute current POST state *Note - these switch cases must be in same order as enum HD_POST_States switch ( postState ) { @@ -125,13 +133,11 @@ case POST_STATE_FW_INTEGRITY: testStatus = execIntegrityTest(); - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_BATTERY: - // TODO implement the battery self test - testStatus = SELF_TEST_STATUS_PASSED; + testStatus = execBatteryTest(); postState = handlePOSTStatus( testStatus ); break; @@ -207,8 +213,7 @@ break; case POST_STATE_UI_POST: - // TODO implement the UI POST self test - testStatus = SELF_TEST_STATUS_PASSED; + testStatus = execUITest(); postState = handlePOSTStatus( testStatus ); break; @@ -217,11 +222,10 @@ postState = handlePOSTStatus( testStatus ); break; - // Should be last POST (and last POST test must be a test that completes in a single call) + // Should be last POST (and last POST test must be a test that completes in a single call) case POST_STATE_FPGA: testStatus = execFPGATest(); handlePOSTStatus( testStatus ); // Ignoring return value because last test - if ( TRUE == tempPOSTPassed ) { postState = POST_STATE_COMPLETED; @@ -232,8 +236,6 @@ } break; - // TODO - add POST test requiring all DG and UI POST tests to pass - case POST_STATE_COMPLETED: // Set overall HD POST status to "passed" postPassed = TRUE; @@ -284,6 +286,7 @@ void signalUIPOSTFinalResult( BOOL passed ) { uiPOSTPassed = passed; + uiPOSTResultReceived = TRUE; } /*********************************************************************//** @@ -298,6 +301,7 @@ void signalDGPOSTFinalResult( BOOL passed ) { dgPOSTPassed = passed; + dgPOSTResultReceived = TRUE; } /*********************************************************************//** @@ -376,9 +380,48 @@ { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; - // TODO - implement + // TODO - implement (need UI to include its version/compatibility info in its request for f/w versions so we can check compatibility) + //SW_COMPATIBILITY_REV return result; } +/*********************************************************************//** + * @brief + * The execUITest function executes the UI POST passed test. + * @details Inputs: uiPOSTResultReceived, uiPOSTPassed, waitForUIPostTimerCtr + * @details Outputs: waitForUIPostTimerCtr + * @return in progress, passed, or failed + *************************************************************************/ +static SELF_TEST_STATUS_T execUITest( void ) +{ +#ifndef DISABLE_UI_POST_TEST + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; + + // UI should have sent POST results before we start this test + if ( TRUE == uiPOSTResultReceived ) + { + if ( TRUE == uiPOSTPassed ) + { + result = SELF_TEST_STATUS_PASSED; + } + else + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_UI_POST_FAILED, 0 ) + result = SELF_TEST_STATUS_FAILED; + } + } + // If UI had not already sent POST results before we started, allow finite period for UI to send. + else if ( ++waitForUIPostTimerCtr > POST_UI_MAX_WAIT_TIME ) + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_UI_POST_FAILED, 1 ) + result = SELF_TEST_STATUS_FAILED; + } +#else + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; +#endif + + return result; +} + /**@}*/ Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rce596a29a2bd6384d70b2fe7b9c332b0f1f37a84 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision ce596a29a2bd6384d70b2fe7b9c332b0f1f37a84) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -103,6 +103,8 @@ #define FRONT_DOOR_SWITCH_MASK 0x0010 ///< Front door switch bit mask. Bit 4 of the GPIO register. #define PUMP_TRACK_SWITCH_MASK 0x0020 ///< Pump track switch bit mask. Bit 5 of the GPIO register. +#define FPGA_BACKUP_ALARM_AUDIO_CONVERT 0.4 ///< Converts backup (piezo) alarm audio ADC volts to amps. + // FPGA Sensors Record #pragma pack(push,1) /// Record structure for FPGA header read. @@ -180,13 +182,13 @@ S16 VBVPosition; ///< Reg 360. Encoder position from VBV pinch valve. 0 until PID interface is enabled. S16 VDiPosition; ///< Reg 362. Encoder position from VDi pinch valve. 0 until PID interface is enabled. S16 VDoPosition; ///< Reg 364. Encoder position from VDo pinch valve. 0 until PID interface is enabled. - S16 VSparePosition; ///< Reg 366. Encoder position from VSpare pinch valve. 0 until PID interface is enabled. + S16 fpgaIntVoltage; ///< Reg 366. Internal FPGA Vcc voltage. 3V range over 12 bits (0..4095). U16 valveStatus; ///< Reg 368. Valve status register. U16 VBAPWMTarget; ///< Reg 370. PWM target duty cycle for VBA pinch valve. U16 VBVPWMTarget; ///< Reg 372. PWM target duty cycle for VBV pinch valve. U16 VDiPWMTarget; ///< Reg 374. PWM target duty cycle for VDi pinch valve. U16 VDoPWMTarget; ///< Reg 376. PWM target duty cycle for VDo pinch valve. - U16 VSparePWMTarget; ///< Reg 378. PWM target duty cycle for Vspare pinch valve. + U16 VSparePWMTarget; ///< Reg 378. Internal FPGA Vcc Aux voltage. U08 syringePumpStatus; ///< Reg 380. Syringe pump status register. U08 syringePumpADCReadCounter; ///< Reg 381. Syringe pump ADC read counter. U08 syringePumpADCandDACStatus; ///< Reg 382. Syringe pump ADC and DAC status register. @@ -206,7 +208,8 @@ U16 VDiCurrent; ///< Reg 410. VDi pinch valve current (Register VAUX11) U16 VSpareSpeed; ///< Reg 412. VSpare speed (Register VAUX5) U16 VSpareCurrent; ///< Reg 414. VSpare current (Register VAUX13) - U16 fpgaTimerCount_ms; ///< Reg 416. Internal FPGA timer count in ms. + U16 fpgaTimerCount_ms; ///< Reg 416. Free running 1ms timer counter. Rolls over at 65535.Internal FPGA timer count in ms. + U16 backupAlarmAudioPeakCurrent; ///< Reg 418. Piezo alarm peak ADC current in previous 10ms. 12 bit unsigned. } FPGA_SENSORS_T; /// Record structure for FPGA continuous priority writes. @@ -1843,6 +1846,22 @@ /*********************************************************************//** * @brief + * The getFPGABackupAlarmAudioCurrent function gets the latest piezo alarm + * audio current reading. + * @details Inputs: fpgaSensorReadings + * @details Outputs: none + * @return Latest piezo alarm audio current reading + *************************************************************************/ +F32 getFPGABackupAlarmAudioCurrent( void ) +{ + U16 adcCnts = fpgaSensorReadings.backupAlarmAudioPeakCurrent; + F32 result = ( ( (F32)adcCnts / (F32)BITS_12_FULL_SCALE ) * FPGA_BACKUP_ALARM_AUDIO_CONVERT ) * (F32)MA_PER_AMP; + + return result; +} + +/*********************************************************************//** + * @brief * The getFPGAAirTrapLevels function gets the latest air trap level sensor * readings. * @details Inputs: fpgaSensorReadings Index: firmware/App/Services/FPGA.h =================================================================== diff -u -r69b93e39861c5493d273f25d9e43cacd0b5819e2 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -112,6 +112,8 @@ void getFPGAAccelMaxes( S16 *xm, S16*ym, S16*zm ); void getFPGAAccelStatus( U16 *cnt, U16 *accelFPGAFaultReg ); +F32 getFPGABackupAlarmAudioCurrent( void ); + void getFPGAAirTrapLevels( BOOL *airAtLower, BOOL *airAtUpper ); void setFPGASensorTest( U08 sensorTest ); Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r7da76d7131d824ab15f58857eeeedcf128e57391 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 7da76d7131d824ab15f58857eeeedcf128e57391) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -327,14 +327,6 @@ { canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); } -#ifdef DEBUG_ENABLED - { - char debugStr[100]; - sprintf( debugStr, "SystemComm-HD resend Last Frame. %2d\n", lastCANPacketSentChannel ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); - } -#endif } // We must be only node on CAN bus - nobody is ACKing our transmitted frames else @@ -343,13 +335,6 @@ canXmitRetryCtr = MAX_XMIT_RETRIES; signalCANXmitsCompleted(); // Clear pending xmit flag clearCANXmitBuffers(); // Clear xmit buffers - nothing is going out right now -#ifdef DEBUG_ENABLED - { - char debugStr[100]; - sprintf( debugStr, "SystemComm-HD is only node.\n" ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - } -#endif } } } @@ -968,13 +953,6 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); #endif } -#ifdef DEBUG_ENABLED - { - char debugStr[100]; - sprintf( debugStr, "SystemComm-HD-Bad Msg CRC.\n" ); - sendDebugDataToUI( (U08*)debugStr ); - } -#endif } /*********************************************************************//** @@ -1557,6 +1535,14 @@ handleTestDialOutPumpHomeRequest( message ); break; + case MSG_ID_SUPER_CLEAR_ALARMS_CMD: + handleTestSuperClearAlarmsRequest( message ); + break; + + case MSG_ID_HD_SET_OP_MODE_REQUEST: + handleTestSetOpModeRequest( message ); + break; + case MSG_ID_HD_FLUID_LEAK_SEND_INTERVAL_OVERRIDE: handleSetFluidLeakBroadcastIntervalOverrideRequest( message ); break; @@ -1589,6 +1575,10 @@ handleBubbleSelfTestRequest( message ); break; + case MSG_ID_HD_BLOOD_PRIME_VOLUME_OVERRIDE: + handleBloodPrimeVolumeOverrideRequest( message ); + break; + case MSG_ID_HD_SWITCHES_STATUS_OVERRIDE: handleSetSwitchesStatusOverrideRequest( message ); break; @@ -1597,14 +1587,10 @@ handleTestSwitchesPublishIntervalOverrideRequest( message ); break; - case MSG_ID_HD_SET_OP_MODE_REQUEST: - handleTestSetOpModeRequest( message ); + case MSG_ID_HD_BLOOD_PRIME_SAFETY_VOLUME_OVERRIDE: + handleBloodPrimeSafetyVolumeOverrideRequest( message ); break; - case MSG_ID_SUPER_CLEAR_ALARMS_CMD: - handleTestSuperClearAlarmsRequest( message ); - break; - case MSG_ID_HD_SYRINGE_PUMP_SEND_INTERVAL_OVERRIDE: handleTestSyringePumpDataBroadcastIntervalOverrideRequest( message ); break; @@ -1641,7 +1627,7 @@ handleTestValvesCurrentOverrideRequest( message ); break; - case MSD_ID_HD_VALVES_POSITION_COUNT_OVERRIDE: + case MSG_ID_HD_VALVES_POSITION_COUNT_OVERRIDE: handleTestValvesPositionCountOverrideRequest( message ); break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r7da76d7131d824ab15f58857eeeedcf128e57391 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 7da76d7131d824ab15f58857eeeedcf128e57391) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -668,7 +668,7 @@ { if ( 0 == message->hdr.payloadLen ) { - handleTreatmentLogDataRequest(); + sendTreatmentLogDataToUI(); } else { @@ -927,9 +927,75 @@ // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer return serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); } - + /*********************************************************************//** * @brief + * The sendTreatmentLogAlarmEventData function constructs a treatment log + * alarm event data message for UI and queues the msg for transmit on the + * appropriate CAN channel. + * @details Inputs: none + * @details Outputs: Treatment log alarm event data msg constructed and queued. + * @param alarmID ID of the occurred alarm + * @param almData1 data associates with the alarm + * @param almData1 data associates with the alarm + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendTreatmentLogAlarmEventData( ALARM_ID_T alarmID, ALARM_DATA_T almData1, ALARM_DATA_T almData2 ) +{ + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + U32 id = (U32)alarmID; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_TREATMENT_LOG_ALARM_EVENT; + msg.hdr.payloadLen = sizeof( ALARM_ID_T ) + 3 * sizeof( F32 ); + + memcpy( payloadPtr, &id, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &almData1.data, sizeof( F32 ) ); + payloadPtr += sizeof( F32 ); + memcpy( payloadPtr, &almData2.data, sizeof( F32 ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + return serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); +} + +/*********************************************************************//** + * @brief + * The sendTreatmentLogEventData function constructs a treatment log parameter + * change event data message for UI and queues the msg for transmit on the + * appropriate CAN channel. + * @details Inputs: none + * @details Outputs: Treatment log event data msg constructed and queued. + * @param event ID of parameter change event + * @param oldValue parameter change event old data value + * @param newValue parameter change event new data value + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendTreatmentLogEventData( EVENT_ID_T event, F32 oldValue, F32 newValue ) +{ + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + U32 eventID = (U32)event; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_TREATMENT_LOG_EVENT; + msg.hdr.payloadLen = sizeof( EVENT_ID_T ) + 3 * sizeof( F32 ); + + memcpy( payloadPtr, &eventID, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &oldValue, sizeof( F32 ) ); + payloadPtr += sizeof( F32 ); + memcpy( payloadPtr, &newValue, sizeof( F32 ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + return serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); +} + +/*********************************************************************//** + * @brief * The handleSampleWaterCmd function handles a sample water user action command * message from the UI. * @details Inputs: none @@ -3095,11 +3161,11 @@ *************************************************************************/ void handleDGTemperatureData( MESSAGE_T *message ) { - if ( message->hdr.payloadLen == sizeof(DG_TEMPERATURES_T) ) + if ( message->hdr.payloadLen == sizeof( TEMPERATURE_SENSORS_DATA_T ) ) { - DG_TEMPERATURES_T payload; - - memcpy( &payload, message->payload, sizeof(DG_TEMPERATURES_T) ); + TEMPERATURE_SENSORS_DATA_T payload; + + memcpy( &payload, message->payload, sizeof( TEMPERATURE_SENSORS_DATA_T ) ); setDialysateTemperatureReadings( payload.TDi, payload.TRo ); } // TODO - what to do if invalid payload length? @@ -3876,9 +3942,11 @@ void handleFWVersionRequest( MESSAGE_T *message ) { MESSAGE_T msg; - HD_VERSIONS_T payload; + HD_VERSIONS_T payload; // TODO - add compatibility data to response U08 *payloadPtr = msg.payload; + // TODO - grab UI version data when UI includes it in this message + // Populate payload payload.major = (U08)HD_VERSION_MAJOR; payload.minor = (U08)HD_VERSION_MINOR; @@ -6010,6 +6078,70 @@ /*********************************************************************//** * @brief + * The handleBloodPrimeVolumeOverrideRequest function handles a request to + * override the calculated blood prime volume (in mL). + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleBloodPrimeVolumeOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // Verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetBloodPrimeVolumeOverride( payload.state.f32 ); + } + else + { + result = testResetBloodPrimeVolumeOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleBloodPrimeSafetyVolumeOverrideRequest function handles a request to + * override the calculated safety blood prime volume (in mL). + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleBloodPrimeSafetyVolumeOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // Verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetBloodPrimeSafetyVolumeOverride( payload.state.f32 ); + } + else + { + result = testResetBloodPrimeSafetyVolumeOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief * The handleHDSoftwareResetRequest function handles a request to reset the * HD firmware processor. * @details Inputs: none Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r7da76d7131d824ab15f58857eeeedcf128e57391 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 7da76d7131d824ab15f58857eeeedcf128e57391) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -306,6 +306,12 @@ // MSG_ID_HD_ACTIVE_ALARMS_LIST_REQUEST_RESPONSE BOOL sendActiveAlarmsList( BOOL accepted, U32 reason, U32 *alarmList, U32 size ); +// MSG_ID_HD_TREATMENT_LOG_ALARM_EVENT +BOOL sendTreatmentLogAlarmEventData( ALARM_ID_T alarmID, ALARM_DATA_T almData1, ALARM_DATA_T almData2 ); + +// MSG_ID_HD_TREATMENT_LOG_EVENT +BOOL sendTreatmentLogEventData( EVENT_ID_T event, F32 oldValue, F32 newValue ); + // *********** public DG command functions ********** // MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS @@ -673,6 +679,12 @@ // MSG_ID_HD_BUBBLE_SELF_TEST_REQUEST void handleBubbleSelfTestRequest( MESSAGE_T *message ); +// MSG_ID_HD_BLOOD_PRIME_VOLUME_OVERRIDE +void handleBloodPrimeVolumeOverrideRequest( MESSAGE_T *message ); + +// MSG_ID_HD_BLOOD_PRIME_SAFETY_VOLUME_OVERRIDE +void handleBloodPrimeSafetyVolumeOverrideRequest( MESSAGE_T *message ); + // MSG_ID_HD_SWITCHES_STATUS_OVERRIDE void handleSetSwitchesStatusOverrideRequest( MESSAGE_T *message ); Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -r69b93e39861c5493d273f25d9e43cacd0b5819e2 -rfbb180e9b4830dd5f890f4f33f022ce375ff4012 --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 69b93e39861c5493d273f25d9e43cacd0b5819e2) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision fbb180e9b4830dd5f890f4f33f022ce375ff4012) @@ -94,7 +94,7 @@ // Control dialysate inlet pump execDialInFlowController(); - // Control dialysate outlet pump + // Control dialysate outlet pump (keep after call to BP and DPi controllers) execDialOutFlowController(); // Monitor switches