Index: firmware/App/HDCommon.h =================================================================== diff -u -r101bf85b0b425e919b01b4b7fabcbd15fd5bbde5 -rb4e7c3c66972779ce787e7fb20f0d9c180daebeb --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 101bf85b0b425e919b01b4b7fabcbd15fd5bbde5) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision b4e7c3c66972779ce787e7fb20f0d9c180daebeb) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file HDCommon.h * -* @author (last) Dara Navaei -* @date (last) 09-Jul-2020 +* @author (last) Sean Nash +* @date (last) 01-Dec-2020 * * @author (original) Sean * @date (original) 27-Feb-2020 @@ -23,37 +23,42 @@ // ********** version ********** #define HD_VERSION_MAJOR 0 -#define HD_VERSION_MINOR 4 -#define HD_VERSION_MICRO 5 -#define HD_VERSION_BUILD 0 +#define HD_VERSION_MINOR 6 +#define HD_VERSION_MICRO 0 +#define HD_VERSION_BUILD 1 // ********** development build switches ********** #ifndef _RELEASE_ -#define UF_TEST_ENABLED 1 // ultrafiltration test build (hard codes treatment params, re-purposes off/stop buttons) -#define UF_TEST_WITH_DG 1 // ultrafiltration test build (sets up DG in standby mode) #ifndef _VECTORCAST_ +// #define RUN_WITHOUT_DG 1 // run HD w/o DG +// #define DISABLE_UI_TREATMENT_WORKFLOW 1 // disable UI treatment workflow // #define RM46_EVAL_BOARD_TARGET 1 // limited build runs on RM46 eval board // #define BREADBOARD_TARGET 1 // old breadboard system build - no longer used? // #define SIMULATE_UI 1 // build w/o requirement that UI be there // #define TASK_TIMING_OUTPUT_ENABLED 1 // re-purposes alarm lamp pins for task timing #define SKIP_POST 1 // skip POST tests - all pass // #define LIMITED_NVDATA_CRC_CHECKS 1 // only perform POST CRC checks on nv-data records that are implemented so far + #define DISABLE_AIR_TRAP_LEVELING 1 // disable air trap level control +// #define DISABLE_3WAY_VALVES 1 // disable 3-way valves +// #define TST_3WAY_VALVES_ALWAYS_OPEN 1 // after POST and homing, open all 4 valves #define DISABLE_ACCELS 1 // disable accelerometer POST and monitoring #define DISABLE_CRC_ERROR 1 // do not error on bad CRC for CAN messages #define DISABLE_ACK_ERRORS 1 // do not error on failure of other node(s) to ACK a message #define DISABLE_MOTOR_CURRENT_CHECKS 1 // do not error on HD pump current checks #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_SALINE_BOLUS_CHECKS 1 // do not error on HD saline bolus checks #define DISABLE_PRESSURE_CHECKS 1 // do not error on HD pressure checks #define DISABLE_UF_ALARMS 1 // do not error on HD ultrafiltration checks - #define RUN_PUMPS_OPEN_LOOP 1 // BP and DPi pumps will be run open loop (no flow sensor feedback) + #define DISABLE_VALVE_ALARMS 1 // do not error on HD valve position +// #define RUN_PUMPS_OPEN_LOOP 1 // BP and DPi pumps will be run open loop (no flow sensor feedback) // #define RAW_FLOW_SENSOR_DATA 1 // test build will not filter flow sensor data // #define READ_FPGA_ASYNC_DATA 1 // test build reads non-priority register page every other time -// #define FLOW_DEBUG 1 // test build sends flow, signal strength, and occlusion readings to debug UART // #define EMC_TEST_BUILD 1 // EMC test build - HD/DG run separately but connected, HD pumps toggle on/off w/ stop button #define ALARMS_DEBUG 1 // triggered alarms sent to debug UART + #define V1_5_SYSTEM 1 // build for v1.5 system #include #include @@ -72,6 +77,43 @@ // **** Common Definitions **** +#pragma pack(push,1) + +/// Payload record structure for an HD versions message. +typedef struct +{ + U08 major; + U08 minor; + U08 micro; + U16 build; + U08 fpgaId; + U08 fpgaMajor; + U08 fpgaMinor; + U08 fpgaLab; +} HD_VERSIONS_T; + +/// Payload record structure for a peristaltic pump data message. +typedef struct +{ + U32 setPoint; + F32 measFlow; + F32 measRotorSpd; + F32 measPumpSpd; + F32 measMCSpd; + F32 measMCCurr; + F32 pwmDC; +} PERISTALTIC_PUMP_STATUS_PAYLOAD_T; + +/// Payload record structure for a pump set point override message. +typedef struct +{ + BOOL reset; + S32 setPt; + U32 ctrlMode; +} OVERRIDE_PUMP_SET_PT_PAYLOAD_T; + +#pragma pack(pop) + // **** Common Macros **** /**@}*/