Mercurial > public > hwos_code
comparison src/ostc3.inc @ 255:ad62dff7739a
add bearing option to compass
author | heinrichsweikamp |
---|---|
date | Mon, 23 Mar 2015 17:07:57 +0100 |
parents | 5fe7aff622f3 |
children | 7eddbcb27109 |
comparison
equal
deleted
inserted
replaced
254:5fe7aff622f3 | 255:ad62dff7739a |
---|---|
231 | 231 |
232 ;---- MS5541 subroutines | 232 ;---- MS5541 subroutines |
233 amb_pressure res 2 | 233 amb_pressure res 2 |
234 temperature res 2 | 234 temperature res 2 |
235 | 235 |
236 W1 res 2 ; Raw (packed) calibration data | |
237 W2 res 2 | |
238 W3 res 2 | |
239 W4 res 2 ; 100 | |
240 C1 res 2 ; Decoded calibration data | 236 C1 res 2 ; Decoded calibration data |
241 C2 res 2 | 237 C2 res 2 |
242 C3 res 2 | 238 C3 res 2 |
243 C4 res 2 ; Here: C4-250 | 239 C4 res 2 ; Here: C4-250 |
244 C5 res 2 ; Here: Reference Temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760) | 240 C5 res 2 ; Here: Reference Temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760) |
281 | 277 |
282 ; Battery gauge (nAs, nC) | 278 ; Battery gauge (nAs, nC) |
283 battery_gauge res 6 ; 48Bit -> 78Ah max... | 279 battery_gauge res 6 ; 48Bit -> 78Ah max... |
284 | 280 |
285 ; IR/S8-Link | 281 ; IR/S8-Link |
286 ir_s8_buffer res .18 | 282 ir_s8_buffer res .18 ; temporally used in get_calibration_data for the raw (packed) calibration data |
287 ir_s8_counter res 1 | 283 ir_s8_counter res 1 |
288 ir_S8_timeout res 1 ; Timeout for valid data | 284 ir_S8_timeout res 1 ; Timeout for valid data |
289 | 285 |
290 ; Compass raw data | 286 ; Compass raw data |
291 compass_DX res 2 | 287 compass_DX res 2 |
324 CNS_start res 2 ; CNS value at beginning of dive | 320 CNS_start res 2 ; CNS value at beginning of dive |
325 GF_start res 1 ; GF value at beginning of dive | 321 GF_start res 1 ; GF value at beginning of dive |
326 | 322 |
327 ;---- Data for graphical compass | 323 ;---- Data for graphical compass |
328 xRD res 2 ; virtual compass ruler offset | 324 xRD res 2 ; virtual compass ruler offset |
325 xRDr res 2 ; virtual compass ruler offset - right end | |
326 xRD180 res 2 ; virtual compass ruler offset for the -180 marker | |
329 xLO res 1 ; lo backup to prevent trashing | 327 xLO res 1 ; lo backup to prevent trashing |
330 xHI res 1 ; hi backup to prevent trashing | 328 xHI res 1 ; hi backup to prevent trashing |
329 xCM res 1 ; compass bearing relative position | |
330 compass_bearing res 2 ; this is where the bearing menu stores the actual heading for bearing | |
331 | 331 |
332 | 332 |
333 ;---------------------------- Common DATA ------------------------------------ | 333 ;---------------------------- Common DATA ------------------------------------ |
334 | 334 |
335 common equ 0x100 ; Alias for "banksel common" | 335 common equ 0x100 ; Alias for "banksel common" |
353 flag7 res 1 | 353 flag7 res 1 |
354 flag8 res 1 | 354 flag8 res 1 |
355 flag9 res 1 | 355 flag9 res 1 |
356 flag10 res 1 | 356 flag10 res 1 |
357 flag11 res 1 | 357 flag11 res 1 |
358 flag12 res 1 | |
358 | 359 |
359 hardware_flag res 1 ; hardware descriptor flag | 360 hardware_flag res 1 ; hardware descriptor flag |
360 | 361 |
361 temp1 res 1 | 362 temp1 res 1 |
362 temp2 res 1 | 363 temp2 res 1 |
423 hi_temp res 1 | 424 hi_temp res 1 |
424 desaturation_time res 2 | 425 desaturation_time res 2 |
425 convert_value_temp res 3 ; used in menu_battery_state_convert_date | 426 convert_value_temp res 3 ; used in menu_battery_state_convert_date |
426 active_gas res 1 | 427 active_gas res 1 |
427 active_diluent res 1 ; As a backup when switching back from Bailout to CCR | 428 active_diluent res 1 ; As a backup when switching back from Bailout to CCR |
428 decoplan_page res 1 | |
429 warning_counter res 1 ; Counts amount of warning in divemode | 429 warning_counter res 1 ; Counts amount of warning in divemode |
430 warning_counter_backup res 1 ; Backup of warning_counter | 430 warning_counter_backup res 1 ; Backup of warning_counter |
431 warning_page res 1 ; current # of warning page | 431 warning_page res 1 ; current # of warning page |
432 | 432 |
433 ; Remind history for menu processor (and such): | 433 ; Remind history for menu processor (and such): |
665 #DEFINE voting_logic_sensor2 flag11,4; =1: This sensor is within the voting logic threshold | 665 #DEFINE voting_logic_sensor2 flag11,4; =1: This sensor is within the voting logic threshold |
666 #DEFINE voting_logic_sensor3 flag11,5; =1: This sensor is within the voting logic threshold | 666 #DEFINE voting_logic_sensor3 flag11,5; =1: This sensor is within the voting logic threshold |
667 #DEFINE cc_active flag11,6; =1: Constant Current active (cR Hardware) | 667 #DEFINE cc_active flag11,6; =1: Constant Current active (cR Hardware) |
668 #DEFINE cv_active flag11,7; =1: Constant Voltage active (cR Hardware) | 668 #DEFINE cv_active flag11,7; =1: Constant Voltage active (cR Hardware) |
669 | 669 |
670 #DEFINE compass_bearing_set flag12,0 ; bearing set | |
671 #DEFINE compass_bearing_eq flag12,1 ; bearing is in direction? do not show << or >> | |
672 #DEFINE compass_bearing_lft flag12,2 ; bearing is to the left/<< if set, otherwise to the right/>> | |
673 #DEFINE compass_bearing_vis flag12,3 ; bearing is visible? (either ahead or behind/-180°) | |
674 #DEFINE compass_bearing_ahd flag12,4 ; bearing is ahead or behind? | |
675 | |
670 ;============================================================================= | 676 ;============================================================================= |
671 ; C-code Routines | 677 ; C-code Routines |
672 ; PART 2 | 678 ; PART 2 |
673 extern deco_calc_CNS_decrease_15min | 679 extern deco_calc_CNS_decrease_15min |
674 extern deco_calc_CNS_fraction | 680 extern deco_calc_CNS_fraction |