Index: firmware/App/HDCommon.h =================================================================== diff -u -r778f343622819491cf644dab36f3194709ce1e95 -rbeeaeab8f92c7791d7ec6a0e19950f1b51485ce3 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 778f343622819491cf644dab36f3194709ce1e95) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision beeaeab8f92c7791d7ec6a0e19950f1b51485ce3) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2022 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 +* @file HDCommon.h * -* @author (last) Sean Nash -* @date (last) 14-Oct-2020 +* @author (last) Sean Nash +* @date (last) 12-Nov-2021 * -* @author (original) Sean -* @date (original) 27-Feb-2020 +* @author (original) Sean +* @date (original) 27-Feb-2020 * ***************************************************************************/ @@ -23,42 +23,70 @@ // ********** 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 29 // ********** development build switches ********** // TODO - remove build switches before release #ifndef _RELEASE_ #ifndef _VECTORCAST_ +// #define USING_DEBUGGER 1 // Want to be able to use the debugger and have break points +// #define BOARD_WITH_NO_HARDWARE 1 // Target is a PCB w/ no hardware // #define RUN_WITHOUT_DG 1 // Run HD w/o DG // #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 DISABLE_ALARM_AUDIO 1 // Disable alarm audio - #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_ALARM_AUDIO 1 // Disable alarm audio +// #define SKIP_POST 1 // Skip POST tests - all pass +// #define DONT_SKIP_NV_POST 1 // Do not skip NV Data POST + #define DISABLE_AIR_TRAP_LEVELING_ALARM 1 // Disable air trap level control alarms // #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_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 RUN_BP_OPEN_LOOP 1 // Run blood pump in open loop mode +// #define RUN_DPI_OPEN_LOOP 1 // Run dialysate inlet pump in open loop mode + #define WORN_OUT_CARTRIDGE 1 // Running with an old worn out cartridge (max wear) + #define PBA_ESTIMATION 1 // Estimate arterial pressure rather than look at PBA sensor #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 DISABLE_VALVE_ALARMS 1 // Do not error on HD valve position + #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality + #define ALWAYS_ALLOW_SYRINGE_PUMP_CMDS 1 // Allow syringe pump commands at any time except when pump is busy +// #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 DISABLE_DIALYSATE_TEMP_CHECK 1 // Disable dialysate temperature check +// #define DISABLE_VALVE_ALARMS 1 // Do not error on HD valve position + #define SKIP_CAL_CHECK 1 // #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 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 + #define ALARM_VOLUME_DEFAULT_LOW 1 // Set default alarm volume to lowest + #define DISABLE_BATT_COMM 1 // Disable battery communication. + #define SKIP_AIR_BUBBLE_CHECK 1 // Skip air bubble detector self-test. + #define DISABLE_OCCLUSION_SELF_TEST 1 // Skip occlusion sensor self-test. +// #define SKIP_CARTRIDGE_REMOVAL 1 // Skip cartridge removal check +// #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters + #define DISABLE_VOLTAGE_MONITOR 1 // Disable voltage monitoring/alarms + #define ALLOW_1_MIN_TREATMENT_DURATION 1 // Allow user to change treatment duration to as low as 1 minute + #define DISABLE_SYRINGE_PUMP_ALARMS 1 // Disable some syringe pump alarms that are triggering intermittently +// #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps +// #define DISABLE_BUBBLE_ALARMS 1 // Disable bubble alarms + #define DISABLE_UI_POST_TEST 1 // Disable the UI POST +// #define DISABLE_UI_COMM_TO_ALARM 1 // Disable UI comm timeouts + // Skip Pre-Treatment and get to treatment as soon as possible + #define SKIP_UI_INTERACTION 1 // Skip UI interaction. + #define SKIP_SAMPLE_WATER 1 // Skip pre-treatment sample water + #define SKIP_CONSUMABLE_TESTS 1 // Skip pre-treatment consumable Self-tests + #define SKIP_DRY_SELF_TESTS 1 // Skip pre-treatment dry self-tests + #define SKIP_PRIMING 1 // Skip Pre-treatment Prime + #define SKIP_WET_SELF_TESTS 1 // Skip Pre-treatment prime wet self-tests + #include #include #endif @@ -89,8 +117,33 @@ U08 fpgaMajor; U08 fpgaMinor; U08 fpgaLab; + U32 compatibilityRev; } HD_VERSIONS_T; +/// DG version struct. +typedef struct +{ + U08 major; ///< DG version major revision + U08 minor; ///< DG version major revision + U08 micro; ///< DG version micro revision + U16 build; ///< DG build version + U08 fpgaId; ///< DG FPGA ID + U08 fpgaMajor; ///< DG FPGA major revision + U08 fpgaMinor; ///< DG FPGA minor revision + U08 fpgaLab; ///< DG FPGA lab revision + U32 compatibilityRev; ///< DG compatibility revision +} DG_VERSIONS_T; + +/// Record defining the fields in a UI version request message. +typedef struct +{ + U08 major; ///< Major version for UI software + U08 minor; ///< Minor version for UI software + U08 micro; ///< Micro version for UI software + U16 build; ///< Build number for UI software + U32 compatibility; ///< Compatibility revision +} UI_VERSIONS_T; + /// Payload record structure for a peristaltic pump data message. typedef struct {