Mercurial > public > hwos_code
comparison src/ostc3.inc @ 145:e3ac5b2021bc
NEW: Setpoint-Fallback option for external O2 sensor failure
author | heinrichsweikamp |
---|---|
date | Tue, 05 Aug 2014 16:55:09 +0200 |
parents | be997abd1f73 |
children | d6ad414c7c12 |
comparison
equal
deleted
inserted
replaced
144:b839972db982 | 145:e3ac5b2021bc |
---|---|
72 #DEFINE warn_battery .9 | 72 #DEFINE warn_battery .9 |
73 | 73 |
74 ; External O2 cell input parameters | 74 ; External O2 cell input parameters |
75 #DEFINE min_mv .80 ; = 8mV | 75 #DEFINE min_mv .80 ; = 8mV |
76 #DEFINE min_mv_in_o2 .380 ; = 38mV | 76 #DEFINE min_mv_in_o2 .380 ; = 38mV |
77 #DEFINE max_mv .2500 ; = 250mV | |
77 | 78 |
78 ; Profile recording parameters | 79 ; Profile recording parameters |
79 #DEFINE logbook_profile_version 0x23 | 80 #DEFINE logbook_profile_version 0x23 |
80 #DEFINE samplingrate_apnoe .1 ; [seconds] | 81 #DEFINE samplingrate_apnoe .1 ; [seconds] |
81 ; Warning: Divisors must be <.16 ! | 82 ; Warning: Divisors must be <.16 ! |
459 o2_ppo2_sensor2 res 1 ; Sensor2 ppO2 (in 0.01bar steps) | 460 o2_ppo2_sensor2 res 1 ; Sensor2 ppO2 (in 0.01bar steps) |
460 o2_ppo2_sensor3 res 1 ; Sensor3 ppO2 (in 0.01bar steps) | 461 o2_ppo2_sensor3 res 1 ; Sensor3 ppO2 (in 0.01bar steps) |
461 hud_battery_mv res 2 | 462 hud_battery_mv res 2 |
462 hud_status_byte res 1 | 463 hud_status_byte res 1 |
463 ;Status Byte/ | 464 ;Status Byte/ |
464 ;Bit0 = 1 -> HUD connection ok | 465 #DEFINE hud_connection_ok hud_status_byte,0 ;Bit0 = 1 -> HUD connection ok |
465 ;Bit1 = 1 -> HUD is calibrated | 466 ;Bit1 = 1 -> HUD is calibrated |
466 ;Bit2 = 1 -> HUD Battery is low (<3000mV) | 467 ;Bit2 = 1 -> HUD Battery is low (<3000mV) |
467 #DEFINE sensor1_active hud_status_byte,3 ; =1: Sensor1 is active | 468 #DEFINE sensor1_active hud_status_byte,3 ;=1: Sensor1 is active |
468 #DEFINE sensor2_active hud_status_byte,4 ; =1: Sensor2 is active | 469 #DEFINE sensor2_active hud_status_byte,4 ;=1: Sensor2 is active |
469 #DEFINE sensor3_active hud_status_byte,5 ;=1: Sensor3 is active | 470 #DEFINE sensor3_active hud_status_byte,5 ;=1: Sensor3 is active |
470 ;Bit6 unused in stand-alone HUD | 471 ;Bit6 unused in stand-alone HUD |
471 ;Bit7 unused in stand-alone HUD | 472 ;Bit7 unused in stand-alone HUD |
472 | 473 |
473 sensor_setpoint res 1 ; sensor ppo2 in 0.01bar for deco routine | 474 sensor_setpoint res 1 ; sensor ppo2 in 0.01bar for deco routine |
528 opt_enable_safetystop res 1 ; =1: A safety stop is shown | 529 opt_enable_safetystop res 1 ; =1: A safety stop is shown |
529 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas | 530 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas |
530 opt_x_s1 res 2 ; calibration factor (Not stored in EEPROM) | 531 opt_x_s1 res 2 ; calibration factor (Not stored in EEPROM) |
531 opt_x_s2 res 2 ; calibration factor (Not stored in EEPROM) | 532 opt_x_s2 res 2 ; calibration factor (Not stored in EEPROM) |
532 opt_x_s3 res 2 ; calibration factor (Not stored in EEPROM) | 533 opt_x_s3 res 2 ; calibration factor (Not stored in EEPROM) |
533 | 534 opt_sensor_fallback res 1 ; =1: Fallback to SP1 when sensor is lost |
534 | 535 |
535 ;-----------------------------EEPROM DATA ------------------------------------ | 536 ;-----------------------------EEPROM DATA ------------------------------------ |
536 ; Automatic reset of all options when this is changed: | 537 ; Automatic reset of all options when this is changed: |
537 #define eeprom_opt_serial 0x0005 ; Version 0.5 | 538 #define eeprom_opt_serial 0x0005 ; Version 0.5 |
538 | 539 |
613 #DEFINE compass_fast_mode flag9,0 ; =1: The compass is in fast mode | 614 #DEFINE compass_fast_mode flag9,0 ; =1: The compass is in fast mode |
614 #DEFINE in_color_menu flag9,1 ; =1: In the color scheme menu | 615 #DEFINE in_color_menu flag9,1 ; =1: In the color scheme menu |
615 #DEFINE bailoutgas_event flag9,2 ; =1: bailout was selected or a gaschange during bailout | 616 #DEFINE bailoutgas_event flag9,2 ; =1: bailout was selected or a gaschange during bailout |
616 #DEFINE event2_occured flag9,3 ; =1: An event in the Eventbyte2 occured, store it! | 617 #DEFINE event2_occured flag9,3 ; =1: An event in the Eventbyte2 occured, store it! |
617 #DEFINE show_safety_stop flag9,4 ; =1: Show the safety stop | 618 #DEFINE show_safety_stop flag9,4 ; =1: Show the safety stop |
618 #DEFINE safety_stop_active flag9,5 ; =1 The safety stop is currently displayed | 619 #DEFINE safety_stop_active flag9,5 ; =1: The safety stop is currently displayed |
619 #DEFINE new_s8_data_available flag9,6 ; =1: New data frame recieved | 620 #DEFINE new_s8_data_available flag9,6 ; =1: New data frame recieved |
620 #DEFINE c3_hardware flag9,7; =1: OSTC 3C hardware | 621 #DEFINE c3_hardware flag9,7; =1: OSTC 3C hardware |
621 | 622 |
622 #DEFINE s8_digital flag10,0; =1: Digital I/O | 623 #DEFINE s8_digital flag10,0; =1: Digital I/O |
623 #DEFINE menu_show_sensors2 flag10,1 ; =1: Update mV data in calibration menu | 624 #DEFINE menu_show_sensors2 flag10,1; =1: Update mV data in calibration menu |
624 | 625 #DEFINE use_02_sensor1 flag10,2; =1: Use this sensor for deco |
626 #DEFINE use_02_sensor2 flag10,3; =1: Use this sensor for deco | |
627 #DEFINE use_02_sensor3 flag10,4; =1: Use this sensor for deco | |
628 #DEFINE setpoint_fallback flag10,5; =1: Fallback to SP1 due to external O2 sensor failure | |
629 #DEFINE blinking_setpoint flag10,6; =1: SP is blinking | |
625 ;============================================================================= | 630 ;============================================================================= |
626 ; C-code Routines | 631 ; C-code Routines |
627 ; PART 2 | 632 ; PART 2 |
628 extern deco_calc_CNS_decrease_15min | 633 extern deco_calc_CNS_decrease_15min |
629 extern deco_calc_CNS_fraction | 634 extern deco_calc_CNS_fraction |