Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r3f325a9fe7cbfb660a3ddf274d471d635266c586 -rf4a79a62bdf5eb98c786daf14c32641d13ee9268 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 3f325a9fe7cbfb660a3ddf274d471d635266c586) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision f4a79a62bdf5eb98c786daf14c32641d13ee9268) @@ -8,7 +8,7 @@ * @file FpgaTD.c * * @author (last) Varshini Nagabooshanam -* @date (last) 05-Aug-2026 +* @date (last) 17-Aug-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -120,8 +120,12 @@ S16 h1MaxEncPosition; ///< Reg 278. H1 max encoder position. S16 h1EncPosition; ///< Reg 280. H1 encoder position (1000 steps/rev). U16 h1Status; ///< Reg 282. H1 status. - U32 reserved2; ///< Reg 284. Reserved and available for future use. - U16 reserved3; ///< Reg 288. Reserved and available for future use. + U08 reserved2; ///< Reg 284. Reserved and available for future use. + U08 h1SPICmdStatus; ///< Reg 285. H1 Magellan SPI command status. + U08 h1ReadCount; ///< Reg 286. H1 read count. + U08 h19SPICmdStatus; ///< Reg 287. H19 Magellan SPI command status. + U08 h19ReadCount; ///< Reg 288. H19 read count. + U08 h19ErrorCount; ///< Reg 289. H19 error count S16 h4Period; ///< Reg 290. H4 measured period (10 uSec). S16 h4Torque; ///< Reg 292. H4 measured torque. S16 h4SpeedFromHall; ///< Reg 294. H4 measured speed from hall sensor(s). @@ -145,15 +149,15 @@ U16 fpgaCompatibilityRev; ///< Reg 328. Compatibility revision. U08 VBTStatus; ///< Reg 330. VBT status register. U08 VBTStatusPWM; ///< Reg 331. VBT PWM status register. - S16 ACPower1Current; ///< Reg 332. AC power current - 1. - S16 ACPower1Voltage; ///< Reg 334. AC power voltage - 1. - S16 ACPower2Current; ///< Reg 336. AC power current - 2. - S16 ACPower2Voltage; ///< Reg 338. AC power voltage - 2. - S16 ACPower3Current; ///< Reg 340. AC power current - 3. - S16 ACPower3Voltage; ///< Reg 342. AC power voltage - 3. + U16 h1OutputWord1; ///< Reg 332. H1 Magellan output word 1. + U16 h1OutputWord2; ///< Reg 334. H1 Magellan output word 2. + U16 h1OutputWord3; ///< Reg 336. H1 Magellan output word 3. + U16 h19OutputWord1; ///< Reg 338. H19 Magellan output word 1. + U16 h19OutputWord2; ///< Reg 340. H19 Magellan output word 2. + U16 h19OutputWord3; ///< Reg 342. H19 Magellan output word 3. S16 h4RotorHallCount; ///< Reg 344. H4 rotor count from hall sensor. U08 h6RotorStatus; ///< Reg 346. H6 rotor status. - U08 reserved5; ///< Reg 347. Reserved register. + U08 h1ErrorCount; ///< Reg 347. H1 error count. U16 h12Speed; ///< Reg 348. H12 speed (air pump in RPM). U16 h4RotorRevsCounter; ///< Reg 350. H4 rotor revs counter U16 baroManufactInfo; ///< Reg 352. Baro sensor manufacturing information. @@ -213,9 +217,21 @@ U32 h10Speed; ///< Reg 34. H10 Syringe pump time between step toggle (1/2 step period). U16 h10DACData; ///< Reg 38. H10 Syringe pump DAC data (12 bits). U08 h10DACControl; ///< Reg 40. H10 Syringe pump ADC and DAC control register. - U16 nibpCtl; ///< Reg 41. NIBP control register. + U08 nibpCtl; ///< Reg 41. NIBP control register. U16 nibpInflate; ///< Reg 42. NIBP inflate pressure register. U32 h5SetSpeed; ///< Reg 44. H5 ejector motor set speed. + U16 h1CmdHeader; ///< Reg 48. H1 command header. + U16 h1InputWord1; ///< Reg 50. H1 input word 1. + U16 h1InputWord2; ///< Reg 52. H1 input word 2. + U16 h1InputWord3; ///< Reg 54. H1 input word 3. + U08 h1FPGACmd; ///< Reg 56. H1 FPGA command register. + U08 h1EnableReset; ///< Reg 57. H1 enable and reset register. + U16 h19CmdHeader; ///< Reg 58. H19 command header. + U16 h19InputWord1; ///< Reg 60. H19 input word 1. + U16 h19InputWord2; ///< Reg 62. H19 input word 2. + U16 h19InputWord3; ///< Reg 64. H19 input word 3. + U08 h19FPGACmd; ///< Reg 66. H19 FPGA command register. + U08 h19EnableReset; ///< Reg 67. H19 enable and reset register. } FPGA_ACTUATORS_T; #pragma pack(pop) @@ -1692,4 +1708,328 @@ return fpgaSensorReadings.bpHr; } +/*********************************************************************//** + * @brief + * The setH1CmdHeader function sets the H1 Magellan command header. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param cmdHeader H1 Magellan command header. + * @return none + *************************************************************************/ +void setH1CmdHeader( U16 cmdHeader ) +{ + fpgaActuatorSetPoints.h1CmdHeader = cmdHeader; +} + +/*********************************************************************//** + * @brief + * The setH1InputWord1 function sets H1 Magellan input word 1. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 1 value. + * @return none + *************************************************************************/ +void setH1InputWord1( U16 inputWord1 ) +{ + fpgaActuatorSetPoints.h1InputWord1 = inputWord1; +} + +/*********************************************************************//** + * @brief + * The setH1InputWord2 function sets H1 Magellan input word 2.hh + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 2 value. + * @return none + *************************************************************************/ +void setH1InputWord2( U16 inputWord2 ) +{ + fpgaActuatorSetPoints.h1InputWord2 = inputWord2; +} + +/*********************************************************************//** + * @brief + * The setH1InputWord3 function sets H1 Magellan input word 3. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 3 value. + * @return none + *************************************************************************/ +void setH1InputWord3( U16 inputWord3 ) +{ + fpgaActuatorSetPoints.h1InputWord3 = inputWord3; +} + +/*********************************************************************//** + * @brief + * The setH1FPGACmd function sets the H1 Magellan FPGA command register. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param cmd FPGA command value. + * @return none + *************************************************************************/ +void setH1FPGACmd( U08 cmd ) +{ + fpgaActuatorSetPoints.h1FPGACmd = cmd; +} + +/*********************************************************************//** + * @brief + * The setH1EnableReset function sets the H1 Magellan enable/reset register. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param value Enable/reset register value. + * @return none + *************************************************************************/ +void setH1EnableReset( U08 value ) +{ + fpgaActuatorSetPoints.h1EnableReset = value; +} + +/*********************************************************************//** + * @brief + * The setH19CmdHeader function sets the H19 Magellan command header. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param cmdHeader H19 Magellan command header. + * @return none + *************************************************************************/ +void setH19CmdHeader( U16 cmdHeader ) +{ + fpgaActuatorSetPoints.h19CmdHeader = cmdHeader; +} + +/*********************************************************************//** + * @brief + * The setH19InputWord1 function sets H19 Magellan input word 1. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 1 value. + * @return none + *************************************************************************/ +void setH19InputWord1( U16 inputWord1 ) +{ + fpgaActuatorSetPoints.h19InputWord1 = inputWord1; +} + +/*********************************************************************//** + * @brief + * The setH19InputWord2 function sets H19 Magellan input word 2. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 2 value. + * @return none + *************************************************************************/ +void setH19InputWord2( U16 inputWord2 ) +{ + fpgaActuatorSetPoints.h19InputWord2 = inputWord2; +} + +/*********************************************************************//** + * @brief + * The setH19InputWord3 function sets H19 Magellan input word 3. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param inputWord Input word 3 value. + * @return none + *************************************************************************/ +void setH19InputWord3( U16 inputWord3 ) +{ + fpgaActuatorSetPoints.h19InputWord3 = inputWord3; +} + +/*********************************************************************//** + * @brief + * The setH19FPGACmd function sets the H19 Magellan FPGA command register. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param cmd FPGA command value. + * @return none + *************************************************************************/ +void setH19FPGACmd( U08 cmd ) +{ + fpgaActuatorSetPoints.h19FPGACmd = cmd; +} + +/*********************************************************************//** + * @brief + * The setH19EnableReset function sets the H19 Magellan enable/reset register. + * @details \b Inputs: none + * @details \b Outputs: fpgaActuatorSetPoints + * @param value Enable/reset register value. + * @return none + *************************************************************************/ +void setH19EnableReset( U08 value ) +{ + fpgaActuatorSetPoints.h19EnableReset = value; +} + +/*********************************************************************//** + * @brief + * The getH1SPICmdStatus function reads the H1 SPI command status. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H1 SPI command status. + *************************************************************************/ +U08 getH1SPICmdStatus( void ) +{ + return fpgaSensorReadings.h1SPICmdStatus; +} + +/*********************************************************************//** + * @brief + * The getH1ReadCount function shows read count of H1. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H1 read count. + *************************************************************************/ +U08 getH1ReadCount( void ) +{ + return fpgaSensorReadings.h1ReadCount; +} + +/*********************************************************************//** + * @brief + * The getH1ErrorCount function shows error count of H1. + * @details \b Inputs: none + * @details \b Outputs: fpgaSensorReadings + * @return H1 error count. + *************************************************************************/ +U08 getH1ErrorCount( void ) +{ + return fpgaSensorReadings.h1ErrorCount; +} + +/*********************************************************************//** + * @brief + * The getH1OutputWord1 function reads H1 output word 1. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H1 output word 1. + *************************************************************************/ +U16 getH1OutputWord1( void ) +{ + return fpgaSensorReadings.h1OutputWord1; +} + +/*********************************************************************//** + * @brief + * The getH1OutputWord2 function reads H1 output word 2. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H1 output word 2. + *************************************************************************/ +U16 getH1OutputWord2( void ) +{ + return fpgaSensorReadings.h1OutputWord2; +} + +/*********************************************************************//** + * @brief + * The getH1OutputWord3 function reads H1 output word 3. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H1 output word 3. + *************************************************************************/ +U16 getH1OutputWord3( void ) +{ + return fpgaSensorReadings.h1OutputWord3; +} + +/*********************************************************************//** + * @brief + * The getH19SPICmdStatus function reads the H19 SPI command status. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 SPI command status. + *************************************************************************/ +U08 getH19SPICmdStatus( void ) +{ + return fpgaSensorReadings.h19SPICmdStatus; +} + +/*********************************************************************//** + * @brief + * The getH19ReadCount function shows the read count of H19. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 read count. + *************************************************************************/ +U08 getH19ReadCount( void ) +{ + return fpgaSensorReadings.h19ReadCount; +} + +/*********************************************************************//** + * @brief + * The getH19ErrorCount function shows error count of H19. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 error count. + *************************************************************************/ +U08 getH19ErrorCount( void ) +{ + return fpgaSensorReadings.h19ErrorCount; +} + +/*********************************************************************//** + * @brief + * The getH19OutputWord1 function reads H19 output word 1. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 output word 1. + *************************************************************************/ +U16 getH19OutputWord1( void ) +{ + return fpgaSensorReadings.h19OutputWord1; +} + +/*********************************************************************//** + * @brief + * The getH19OutputWord2 function reads H19 output word 2. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 output word 2. + *************************************************************************/ +U16 getH19OutputWord2( void ) +{ + return fpgaSensorReadings.h19OutputWord2; +} + +/*********************************************************************//** + * @brief + * The getH19OutputWord3 function reads H19 output word 3. + * @details \b Inputs: fpgaSensorReadings + * @details \b Outputs: none + * @return H19 output word 3. + *************************************************************************/ +U16 getH19OutputWord3( void ) +{ + return fpgaSensorReadings.h19OutputWord3; +} + +/*********************************************************************//** + * @brief + * The geth1ReadEnableRest function reads the H1 status. + * @details \b Inputs: fpgaActuatorSetPoints + * @details \b Outputs: none + * @return H1 enable/rest status. + *************************************************************************/ +U08 geth1ReadEnableRest( void ) +{ + return fpgaActuatorSetPoints.h1EnableReset; +} + +/*********************************************************************//** + * @brief + * The geth19ReadEnableRest function reads the H19 status. + * @details \b Inputs: fpgaActuatorSetPoints + * @details \b Outputs: none + * @return H19 enable/rest status. + *************************************************************************/ +U08 geth19ReadEnableRest( void ) +{ + return fpgaActuatorSetPoints.h19EnableReset; +} + /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r32df017beb715408e7eb1d2097d12f0c83638427 -rf4a79a62bdf5eb98c786daf14c32641d13ee9268 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 32df017beb715408e7eb1d2097d12f0c83638427) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision f4a79a62bdf5eb98c786daf14c32641d13ee9268) @@ -7,8 +7,8 @@ * * @file Messaging.c * -* @author (last) Praneeth Bunne -* @date (last) 10-Aug-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 11-Aug-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -39,7 +39,6 @@ #include "OperationModes.h" #include "PAL.h" #include "Pressures.h" -#include "RotaryValve.h" #include "StateTxBloodPrime.h" #include "StateTxDialysis.h" #include "StateTxPaused.h" @@ -171,9 +170,6 @@ { MSG_ID_TD_AIR_TRAP_LEVEL_RAW_OVERRIDE_REQUEST, &testRawLevelSensorOverride }, { MSG_ID_TD_AIR_TRAP_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testAirTrapDataPublishIntervalOverride }, { MSG_ID_TD_3_WAY_VALVE_SET_STATE_REQUEST, &testSet3WayValve }, - { MSG_ID_TD_ROTARY_PINCH_VALVE_SET_POS_REQUEST, &testSetValve }, - { MSG_ID_TD_ROTARY_PINCH_VALVE_STATUS_OVERRIDE_REQUEST, &testValveStatusOverride }, - { MSG_ID_TD_ROTARY_PINCH_VALVE_POSITION_OVERRIDE_REQUEST, &testValveEncoderPositionOverride }, { MSG_ID_TD_VALVES_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testValvesDataPublishIntervalOverride }, { MSG_ID_TD_PINCH_VALVE_SET_POSITION_REQUEST, &testValveSetABCCmdPosition }, { MSG_ID_TD_PINCH_VALVE_HOME_REQUEST, &testHomeValve }, Index: firmware/App/TDCommon.h =================================================================== diff -u -r3f0d1433b3481160bf554aaf7371708380211a36 -rf4a79a62bdf5eb98c786daf14c32641d13ee9268 --- firmware/App/TDCommon.h (.../TDCommon.h) (revision 3f0d1433b3481160bf554aaf7371708380211a36) +++ firmware/App/TDCommon.h (.../TDCommon.h) (revision f4a79a62bdf5eb98c786daf14c32641d13ee9268) @@ -8,7 +8,7 @@ * @file TDCommon.h * * @author (last) Varshini Nagabooshanam -* @date (last) 02-Jul-2026 +* @date (last) 14-Aug-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -25,7 +25,7 @@ #define TD_VERSION_MAJOR 0 #define TD_VERSION_MINOR 0 #define TD_VERSION_MICRO 0 -#define TD_VERSION_BUILD 71 +#define TD_VERSION_BUILD 72 // ********** development build switches ********** @@ -39,7 +39,7 @@ // #define TEST_UI_ONLY 1 // Alpha test with TD and UI only - no DD #define TEST_DISABLE_UI_ALARMS 1 // Disable UI alarms // #define TEST_USE_OFF_AS_STOP_BUTTON 1 // Alpha test re-purposing off button as a stop button -// #define TEST_NO_PRESSURE_CHECKS 1 // Alpha test with no pressure sensor checks +// #define TEST_NO_PRESSURE_CHECKS 1 // Alpha test with no pressure sensor checks // #define TEST_NO_STOP_CONSUME_CHECK 1 // Alpha test with no check for stop button timeout // #define ASN_DEMO 1