comparison src/customview.asm @ 471:9edb1359ce43

NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS CHANGE: Customview 4 shows Clock, Battery Information and Tissue Information
author heinrichsweikamp
date Sun, 11 Dec 2016 14:43:56 +0100
parents 23b58c4bc6aa
children 4fdf6886004b
comparison
equal deleted inserted replaced
470:81faca166e1b 471:9edb1359ce43
35 dcfsnz WREG,F 35 dcfsnz WREG,F
36 goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return ;bra customview_1sec_view2 36 goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return ;bra customview_1sec_view2
37 dcfsnz WREG,F 37 dcfsnz WREG,F
38 goto TFT_decoplan ; Show decoplan ; and return; bra customview_1sec_view3 38 goto TFT_decoplan ; Show decoplan ; and return; bra customview_1sec_view3
39 dcfsnz WREG,F 39 dcfsnz WREG,F
40 goto TFT_ead_end_tissues_clock ; Update EAD/END, Tissues and clock ; and return; bra customview_1sec_view4 40 goto TFT_battinfo_tissues_clock ; Update EAD/END, Tissues and clock ; and return; bra customview_1sec_view4
41 dcfsnz WREG,F 41 dcfsnz WREG,F
42 goto TFT_gf_info ; Update GF informations ; and return bra customview_1sec_view5 42 goto TFT_gf_info ; Update GF informations ; and return bra customview_1sec_view5
43 dcfsnz WREG,F 43 dcfsnz WREG,F
44 return ; Compass updated seperately (Faster) in divemode; bra customview_1sec_view6 44 return ; Compass updated seperately (Faster) in divemode; bra customview_1sec_view6
45 dcfsnz WREG,F 45 dcfsnz WREG,F
46 goto TFT_dyn_gaslist ; Update the gaslist ; and return bra customview_1sec_view7 46 goto TFT_dyn_gaslist ; Update the gaslist ; and return bra customview_1sec_view7
47 dcfsnz WREG,F 47 dcfsnz WREG,F
48 goto TFT_hud_voltages ; Show HUD details ; and return bra customview_1sec_view8 48 goto TFT_hud_voltages ; Show HUD details ; and return bra customview_1sec_view8
49 dcfsnz WREG,F 49 dcfsnz WREG,F
50 bra customview_1sec_view9 ; Make sure to change value in "check_ppo2_display:" when moving around custom views 50 bra customview_1sec_view9 ; Make sure to change value in "check_ppo2_display:" when moving around custom views
51 dcfsnz WREG,F 51 dcfsnz WREG,F
52 goto TFT_sensor_check ; Show ppO2 of O2 and Diluent ; and return bra customview_1sec_view10 52 goto TFT_sensor_check ; Show ppO2 of O2 and Diluent ; and return bra customview_1sec_view10
53 dcfsnz WREG,F
54 goto TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS
53 ; Menupos3=0, do nothing 55 ; Menupos3=0, do nothing
54 return 56 return
55 57
56 ;customview_1sec_view3: 58 ;customview_1sec_view3:
57 ; goto TFT_decoplan ; Show decoplan ; and return 59 ; goto TFT_decoplan ; Show decoplan ; and return
58 ;customview_1sec_view2: 60 ;customview_1sec_view2:
59 ; goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return 61 ; goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return
60 ;customview_1sec_view1: 62 ;customview_1sec_view1:
61 ; goto TFT_update_ppo2_sensors ; Update Sensor data ; and return 63 ; goto TFT_update_ppo2_sensors ; Update Sensor data ; and return
62 ;customview_1sec_view4: 64 ;customview_1sec_view4:
63 ; goto TFT_ead_end_tissues_clock ; Update EAD/END, Tissues and clock ; and return 65 ; goto TFT_battinfo_tissues_clock ; Update EAD/END, Tissues and clock ; and return
64 ;customview_1sec_view5: 66 ;customview_1sec_view5:
65 ; goto TFT_gf_info ; Update GF informations ; and return 67 ; goto TFT_gf_info ; Update GF informations ; and return
66 ;customview_1sec_view6: 68 ;customview_1sec_view6:
67 ; return ; Compass updated seperately (Faster) in divemode 69 ; return ; Compass updated seperately (Faster) in divemode
68 ; 70 ;
362 ; Show next customview (and delete this flag) 364 ; Show next customview (and delete this flag)
363 global customview_toggle 365 global customview_toggle
364 customview_toggle: 366 customview_toggle:
365 bcf switch_right 367 bcf switch_right
366 incf menupos3,F ; Number of customview to show 368 incf menupos3,F ; Number of customview to show
367 movlw d'10' ; Max number of customsviews in divemode 369 movlw d'11' ; Max number of customsviews in divemode
368 cpfsgt menupos3 ; Max reached? 370 cpfsgt menupos3 ; Max reached?
369 bra customview_mask ; No, show 371 bra customview_mask ; No, show
370 customview_toggle_reset: ; Timeout occured 372 customview_toggle_reset: ; Timeout occured
371 clrf menupos3 ; Reset to zero (Zero=no custom view) 373 clrf menupos3 ; Reset to zero (Zero=no custom view)
372 global customview_mask 374 global customview_mask
375 WIN_BOX_BLACK dm_customview_row, dm_customview_bot, dm_customview_column, dm_customview_rgt ; top, bottom, left, right 377 WIN_BOX_BLACK dm_customview_row, dm_customview_bot, dm_customview_column, dm_customview_rgt ; top, bottom, left, right
376 WIN_SMALL dm_customview_column,dm_customview_row 378 WIN_SMALL dm_customview_column,dm_customview_row
377 call TFT_standard_color 379 call TFT_standard_color
378 movff menupos3,WREG ; Menupos3 holds number of customview function 380 movff menupos3,WREG ; Menupos3 holds number of customview function
379 dcfsnz WREG,F 381 dcfsnz WREG,F
380 bra customview_init_view1 382 bra customview_init_view1 ; Update Sensor data
381 dcfsnz WREG,F 383 dcfsnz WREG,F
382 bra customview_init_view2 384 bra customview_init_view2 ; average depth and stopwatch
383 dcfsnz WREG,F 385 dcfsnz WREG,F
384 bra customview_init_view3 386 bra customview_init_view3 ; Decoplan
385 dcfsnz WREG,F 387 dcfsnz WREG,F
386 bra customview_init_view4 388 bra customview_init_view4 ; Battery info, Tissues and clock
387 dcfsnz WREG,F 389 dcfsnz WREG,F
388 bra customview_init_view5 ; GF informations 390 bra customview_init_view5 ; GF informations
389 dcfsnz WREG,F 391 dcfsnz WREG,F
390 bra customview_init_view6 ; Compass 392 bra customview_init_view6 ; Compass
391 dcfsnz WREG,F 393 dcfsnz WREG,F
392 bra customview_init_view7 ; Dynamic gaslist 394 bra customview_init_view7 ; Dynamic gaslist
393 dcfsnz WREG,F 395 dcfsnz WREG,F
394 bra customview_init_view8 ; HUD voltages 396 bra customview_init_view8 ; HUD voltages
395 dcfsnz WREG,F 397 dcfsnz WREG,F
396 bra customview_init_view9 ; Ceiling 398 bra customview_init_view9 ; ppO2, Ceiling and current GF
397 dcfsnz WREG,F 399 dcfsnz WREG,F
398 bra customview_init_view10 ; Sensor check 400 bra customview_init_view10 ; Sensor check
401 dcfsnz WREG,F
402 bra customview_init_view11 ; ppO2, END/EAD and CNS
403
399 customview_init_nocustomview: 404 customview_init_nocustomview:
400 call I2C_sleep_accelerometer ; Stop accelerometer 405 call I2C_sleep_accelerometer ; Stop accelerometer
401 call I2C_sleep_compass ; Stop compass 406 call I2C_sleep_compass ; Stop compass
402 bra customview_toggle_exit 407 bra customview_toggle_exit
403 408
432 bra customview_toggle ; Yes, Call next view... 437 bra customview_toggle ; Yes, Call next view...
433 call TFT_decoplan ; Show decoplan 438 call TFT_decoplan ; Show decoplan
434 bra customview_toggle_exit 439 bra customview_toggle_exit
435 440
436 customview_init_view4: 441 customview_init_view4:
437 call TFT_ead_end_tissues_clock_mask ; Setup Mask 442 call TFT_battinfo_tissues_clock_mask ; Setup Mask
438 call TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock 443 call TFT_battinfo_tissues_clock ; Show Battery info, Tissues and clock
439 bra customview_toggle_exit 444 bra customview_toggle_exit
440 445
441 customview_init_view5: 446 customview_init_view5:
442 btfsc FLAG_apnoe_mode ; In Apnoe mode? 447 btfsc FLAG_apnoe_mode ; In Apnoe mode?
443 bra customview_toggle ; Yes, Call next view... 448 bra customview_toggle ; Yes, Call next view...
479 bnz customview_toggle ; no, Call next view... 484 bnz customview_toggle ; no, Call next view...
480 call TFT_hud_mask ; Setup HUD mask 485 call TFT_hud_mask ; Setup HUD mask
481 call TFT_hud_voltages ; Show HUD details 486 call TFT_hud_voltages ; Show HUD details
482 bra customview_toggle_exit 487 bra customview_toggle_exit
483 488
484 customview_init_view9: ; Ceiling 489 customview_init_view9: ; ppO2, Ceiling and current GF
485 btfsc FLAG_apnoe_mode ; In Apnoe mode? 490 btfsc FLAG_apnoe_mode ; In Apnoe mode?
486 bra customview_toggle ; yes, Call next view... 491 bra customview_toggle ; yes, Call next view...
487 btfsc FLAG_gauge_mode ; In Gauge mode? 492 btfsc FLAG_gauge_mode ; In Gauge mode?
488 bra customview_toggle ; Yes, Call next view... 493 bra customview_toggle ; Yes, Call next view...
489 call TFT_ceiling_mask ; Setup mask 494 call TFT_ceiling_mask ; Setup mask
500 call TFT_gf_mask_cGF ; Setup Mask - current GF only 505 call TFT_gf_mask_cGF ; Setup Mask - current GF only
501 call TFT_gf_info ; Show GF informations 506 call TFT_gf_info ; Show GF informations
502 bra customview_toggle_exit 507 bra customview_toggle_exit
503 508
504 customview_init_view10: ; Sensor check 509 customview_init_view10: ; Sensor check
505 btfsc FLAG_apnoe_mode ; In Apnoe mode? 510 btfsc FLAG_apnoe_mode ; In Apnoe mode?
506 bra customview_toggle ; yes, Call next view... 511 bra customview_toggle ; yes, Call next view...
507 btfsc FLAG_gauge_mode ; In Gauge mode? 512 btfsc FLAG_gauge_mode ; In Gauge mode?
508 bra customview_toggle ; Yes, Call next view... 513 bra customview_toggle ; Yes, Call next view...
509 btfss FLAG_ccr_mode ; In CC mode? 514 btfss FLAG_ccr_mode ; In CC mode?
510 bra customview_toggle ; no, Call next view... 515 bra customview_toggle ; no, Call next view...
511 516
512 call TFT_sensor_check_mask ; Show ppO2 of O2 and Diluent mask 517 call TFT_sensor_check_mask ; Show ppO2 of O2 and Diluent mask
513 call TFT_sensor_check ; Show ppO2 of O2 and Diluent 518 call TFT_sensor_check ; Show ppO2 of O2 and Diluent
514 bra customview_toggle_exit 519 bra customview_toggle_exit
515 520
521 customview_init_view11: ; ppO2, END/EAD and CNS
522 btfsc FLAG_apnoe_mode ; In Apnoe mode?
523 bra customview_toggle ; yes, Call next view...
524 btfsc FLAG_gauge_mode ; In Gauge mode?
525 bra customview_toggle ; Yes, Call next view...
526
527 call TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask
528 call TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS
529 bra customview_toggle_exit
530
516 customview_toggle_exit: 531 customview_toggle_exit:
517 call TFT_standard_color 532 call TFT_standard_color
518 bcf toggle_customview ; Clear flag 533 bcf toggle_customview ; Clear flag
519 return 534 return
520 535