comparison src/tft_outputs.asm @ 124:40ff64d60054

cleanup
author heinrichsweikamp
date Sun, 29 Jun 2014 13:53:46 +0200
parents d076e9c02438
children 9e856337b225
comparison
equal deleted inserted replaced
123:d076e9c02438 124:40ff64d60054
338 global TFT_show_color_schemes 338 global TFT_show_color_schemes
339 TFT_show_color_schemes: ; update the color schemes 339 TFT_show_color_schemes: ; update the color schemes
340 bsf divemode ; put in divemode 340 bsf divemode ; put in divemode
341 call TFT_divemask_color 341 call TFT_divemask_color
342 WIN_TINY divemode_mask_depth_column,divemode_mask_depth_row+.40 342 WIN_TINY divemode_mask_depth_column,divemode_mask_depth_row+.40
343 lfsr FSR2,buffer
344 STRCAT_TEXT_PRINT tDepth 343 STRCAT_TEXT_PRINT tDepth
345 WIN_TINY divemode_mask_maxdepth_column,divemode_mask_maxdepth_row+.40 344 WIN_TINY divemode_mask_maxdepth_column,divemode_mask_maxdepth_row+.40
346 lfsr FSR2,buffer
347 STRCAT_TEXT_PRINT tMaxDepth 345 STRCAT_TEXT_PRINT tMaxDepth
348 WIN_TINY divemode_mask_divetime_column,divemode_mask_divetime_row+.40 346 WIN_TINY divemode_mask_divetime_column,divemode_mask_divetime_row+.40
349 lfsr FSR2,buffer
350 STRCAT_TEXT_PRINT tDivetime 347 STRCAT_TEXT_PRINT tDivetime
351 348
352 ; Show some demo screen 349 ; Show some demo screen
353 350
354 ; Depth demo 351 ; Depth demo
355 call TFT_standard_color 352 call TFT_standard_color
356 lfsr FSR2,buffer
357 WIN_MEDIUM depth_column+.3,depth_row+.40 353 WIN_MEDIUM depth_column+.3,depth_row+.40
358 movlw LOW .5172 354 movlw LOW .5172
359 movwf lo 355 movwf lo
360 movlw HIGH .5172 356 movlw HIGH .5172
361 movwf hi 357 movwf hi
367 WIN_SMALL depth_dm_column-.15,max_depth_dm_row+.40 363 WIN_SMALL depth_dm_column-.15,max_depth_dm_row+.40
368 movlw LOW .5172 364 movlw LOW .5172
369 movwf lo 365 movwf lo
370 movlw HIGH .5172 366 movlw HIGH .5172
371 movwf hi 367 movwf hi
372 lfsr FSR2,buffer
373 PUTC "." 368 PUTC "."
374 movlw d'4' 369 movlw d'4'
375 movwf ignore_digits 370 movwf ignore_digits
376 bsf ignore_digit5 371 bsf ignore_digit5
377 output_16dp d'0' ; .1m in SMALL font 372 output_16dp d'0' ; .1m in SMALL font
378 STRCAT_PRINT "" ; Display decimeters 373 STRCAT_PRINT "" ; Display decimeters
379 WIN_FONT FT_SMALL 374 WIN_FONT FT_SMALL
380 375
381 ; Max. Depth demo 376 ; Max. Depth demo
382 WIN_MEDIUM max_depth_column,max_depth_row+.40 377 WIN_MEDIUM max_depth_column,max_depth_row+.40
383 lfsr FSR2,buffer
384 bsf ignore_digit4 ; no 0.1m 378 bsf ignore_digit4 ; no 0.1m
385 bsf leftbind 379 bsf leftbind
386 movlw LOW .6349 380 movlw LOW .6349
387 movwf lo 381 movwf lo
388 movlw HIGH .6349 382 movlw HIGH .6349
390 output_16 384 output_16
391 STRCAT_PRINT "" ; Display full meters 385 STRCAT_PRINT "" ; Display full meters
392 bcf leftbind 386 bcf leftbind
393 ; .1m in SMALL font 387 ; .1m in SMALL font
394 WIN_SMALL max_depth_dm_column,max_depth_dm_row+.40 388 WIN_SMALL max_depth_dm_column,max_depth_dm_row+.40
395 lfsr FSR2,buffer
396 PUTC "." 389 PUTC "."
397 movlw d'4' 390 movlw d'4'
398 movwf ignore_digits 391 movwf ignore_digits
399 bsf ignore_digit5 392 bsf ignore_digit5
400 bsf leftbind 393 bsf leftbind
408 401
409 ; Divetime demo 402 ; Divetime demo
410 movff mins,lo 403 movff mins,lo
411 clrf hi 404 clrf hi
412 WIN_MEDIUM divetime_column, divetime_row+.40 405 WIN_MEDIUM divetime_column, divetime_row+.40
413 lfsr FSR2,buffer
414 output_16_3 ; displays only last three figures from a 16Bit value (0-999) 406 output_16_3 ; displays only last three figures from a 16Bit value (0-999)
415 STRCAT_PRINT "" ; Show minutes in large font 407 STRCAT_PRINT "" ; Show minutes in large font
416 WIN_SMALL divetime_secs_column, divetime_secs_row+.40 ; left position for two sec figures 408 WIN_SMALL divetime_secs_column, divetime_secs_row+.40 ; left position for two sec figures
417 lfsr FSR2,buffer
418 PUTC ':' 409 PUTC ':'
419 bsf leftbind 410 bsf leftbind
420 movff secs,lo 411 movff secs,lo
421 output_99x 412 output_99x
422 bcf leftbind 413 bcf leftbind
427 418
428 global TFT_divemode_mask 419 global TFT_divemode_mask
429 TFT_divemode_mask: ; Displays mask in Dive-Mode 420 TFT_divemode_mask: ; Displays mask in Dive-Mode
430 call TFT_divemask_color 421 call TFT_divemask_color
431 WIN_TINY divemode_mask_depth_column,divemode_mask_depth_row 422 WIN_TINY divemode_mask_depth_column,divemode_mask_depth_row
432 lfsr FSR2,buffer
433 STRCAT_TEXT_PRINT tDepth 423 STRCAT_TEXT_PRINT tDepth
434 WIN_TINY divemode_mask_maxdepth_column,divemode_mask_maxdepth_row 424 WIN_TINY divemode_mask_maxdepth_column,divemode_mask_maxdepth_row
435 lfsr FSR2,buffer
436 STRCAT_TEXT_PRINT tMaxDepth 425 STRCAT_TEXT_PRINT tMaxDepth
437 WIN_TINY divemode_mask_divetime_column,divemode_mask_divetime_row 426 WIN_TINY divemode_mask_divetime_column,divemode_mask_divetime_row
438 lfsr FSR2,buffer
439 STRCAT_TEXT_PRINT tDivetime 427 STRCAT_TEXT_PRINT tDivetime
440 428
441 call TFT_standard_color 429 call TFT_standard_color
442 return 430 return
443 431
452 WIN_SMALL velocity_text_column,velocity_text_row 440 WIN_SMALL velocity_text_column,velocity_text_row
453 441
454 TSTOSS opt_units ; 0=Meters, 1=Feets 442 TSTOSS opt_units ; 0=Meters, 1=Feets
455 bra TFT_display_velocity_metric 443 bra TFT_display_velocity_metric
456 ;TFT_display_velocity_imperial: 444 ;TFT_display_velocity_imperial:
457 lfsr FSR2,buffer
458 movff divA+0,WREG ; divA+0 = m/min 445 movff divA+0,WREG ; divA+0 = m/min
459 mullw .100 ; PRODL:PRODH = mbar/min 446 mullw .100 ; PRODL:PRODH = mbar/min
460 movff PRODL,lo 447 movff PRODL,lo
461 movff PRODH,hi 448 movff PRODH,hi
462 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 449 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
470 STRCAT_TEXT_PRINT tVelImperial ; Unit switch 457 STRCAT_TEXT_PRINT tVelImperial ; Unit switch
471 call TFT_standard_color 458 call TFT_standard_color
472 return 459 return
473 460
474 TFT_display_velocity_metric: 461 TFT_display_velocity_metric:
475 lfsr FSR2,buffer
476 movff divA+0,lo ; divA+0 = m/min 462 movff divA+0,lo ; divA+0 = m/min
477 movlw '-' 463 movlw '-'
478 btfsc neg_flag 464 btfsc neg_flag
479 movlw '+' 465 movlw '+'
480 movwf POSTINC2 466 movwf POSTINC2
516 return ; Yes, return 502 return ; Yes, return
517 call TFT_standard_color 503 call TFT_standard_color
518 movff int_O_ascenttime+0,lo ; TTS 504 movff int_O_ascenttime+0,lo ; TTS
519 movff int_O_ascenttime+1,hi ; on 16bits 505 movff int_O_ascenttime+1,hi ; on 16bits
520 WIN_MEDIUM tts_value_column,tts_value_row 506 WIN_MEDIUM tts_value_column,tts_value_row
521 lfsr FSR2,buffer
522 output_16_3 ;Displays only 0...999 507 output_16_3 ;Displays only 0...999
523 STRCAT_PRINT "'" 508 STRCAT_PRINT "'"
524 return 509 return
525 510
526 global TFT_display_ndl 511 global TFT_display_ndl
527 TFT_display_ndl: 512 TFT_display_ndl:
528 btfsc divemode_menu ; Is the dive mode menu shown? 513 btfsc divemode_menu ; Is the dive mode menu shown?
529 return ; Yes, return 514 return ; Yes, return
530 WIN_MEDIUM ndl_value_column,ndl_value_row 515 WIN_MEDIUM ndl_value_column,ndl_value_row
531 lfsr FSR2,buffer
532 call TFT_standard_color 516 call TFT_standard_color
533 movff char_O_nullzeit,lo ; Get NDL from C-code 517 movff char_O_nullzeit,lo ; Get NDL from C-code
534 output_8 518 output_8
535 STRCAT_PRINT "'" 519 STRCAT_PRINT "'"
536 return 520 return
546 ; rcall TFT_divemode_warning_counter ; Yes, show the number 530 ; rcall TFT_divemode_warning_counter ; Yes, show the number
547 return 531 return
548 532
549 ;TFT_divemode_warning_counter: 533 ;TFT_divemode_warning_counter:
550 ; WIN_SMALL warning_icon_column+.8,warning_icon_row+.13 534 ; WIN_SMALL warning_icon_column+.8,warning_icon_row+.13
551 ; lfsr FSR2,buffer
552 ; call TFT_warnings_color 535 ; call TFT_warnings_color
553 ; movff warning_counter,lo 536 ; movff warning_counter,lo
554 ; bsf leftbind 537 ; bsf leftbind
555 ; output_8 538 ; output_8
556 ; bcf leftbind 539 ; bcf leftbind
620 TFT_display_deko: 603 TFT_display_deko:
621 btfsc divemode_menu ; Is the dive mode menu shown? 604 btfsc divemode_menu ; Is the dive mode menu shown?
622 return ; Yes, return 605 return ; Yes, return
623 WIN_MEDIUM decostop_1st_stop_column,decostop_1st_stop_row 606 WIN_MEDIUM decostop_1st_stop_column,decostop_1st_stop_row
624 TFT_color_code warn_ceiling ; Color-code Output 607 TFT_color_code warn_ceiling ; Color-code Output
625 lfsr FSR2,buffer
626 movff char_O_first_deco_depth,lo ; Ceiling in m 608 movff char_O_first_deco_depth,lo ; Ceiling in m
627 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 609 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
628 movff char_O_first_deco_time,lo ; length of first stop in min 610 movff char_O_first_deco_time,lo ; length of first stop in min
629 output_99 611 output_99
630 STRCAT_PRINT "'" 612 STRCAT_PRINT "'"
649 WIN_BOX_BLACK decostop_5th_stop_row, divemode_simtext_row-1, decostop_5th_stop_column, decostop_6th_stop_column ; top, bottom, left, right 631 WIN_BOX_BLACK decostop_5th_stop_row, divemode_simtext_row-1, decostop_5th_stop_column, decostop_6th_stop_column ; top, bottom, left, right
650 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right 632 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right
651 return 633 return
652 TFT_display_deko2: 634 TFT_display_deko2:
653 WIN_SMALL decostop_2nd_stop_column,decostop_2nd_stop_row 635 WIN_SMALL decostop_2nd_stop_column,decostop_2nd_stop_row
654 lfsr FSR2,buffer
655 movff char_O_deco_depth+1,lo ; stop in m 636 movff char_O_deco_depth+1,lo ; stop in m
656 bcf lo,7 ; Clear GAS_SWITCH bit 637 bcf lo,7 ; Clear GAS_SWITCH bit
657 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 638 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
658 movff char_O_deco_time+1,lo ; length of stop in min 639 movff char_O_deco_time+1,lo ; length of stop in min
659 output_99 640 output_99
666 WIN_BOX_BLACK decostop_4th_stop_row, divemode_simtext_row-1, decostop_4th_stop_column, .159 ; top, bottom, left, right 647 WIN_BOX_BLACK decostop_4th_stop_row, divemode_simtext_row-1, decostop_4th_stop_column, .159 ; top, bottom, left, right
667 return 648 return
668 649
669 TFT_display_deko3: 650 TFT_display_deko3:
670 WIN_SMALL decostop_3rd_stop_column,decostop_3rd_stop_row 651 WIN_SMALL decostop_3rd_stop_column,decostop_3rd_stop_row
671 lfsr FSR2,buffer
672 movff char_O_deco_depth+2,lo ; stop in m 652 movff char_O_deco_depth+2,lo ; stop in m
673 bcf lo,7 ; Clear GAS_SWITCH bit 653 bcf lo,7 ; Clear GAS_SWITCH bit
674 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 654 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
675 movff char_O_deco_time+2,lo ; length of stop in min 655 movff char_O_deco_time+2,lo ; length of stop in min
676 output_99 656 output_99
683 WIN_BOX_BLACK decostop_4th_stop_row, divemode_simtext_row-1, decostop_4th_stop_column, .159 ; top, bottom, left, right 663 WIN_BOX_BLACK decostop_4th_stop_row, divemode_simtext_row-1, decostop_4th_stop_column, .159 ; top, bottom, left, right
684 return ; Done. 664 return ; Done.
685 665
686 TFT_display_deko4: 666 TFT_display_deko4:
687 WIN_SMALL decostop_4th_stop_column,decostop_4th_stop_row 667 WIN_SMALL decostop_4th_stop_column,decostop_4th_stop_row
688 lfsr FSR2,buffer
689 movff char_O_deco_depth+3,lo ; stop in m 668 movff char_O_deco_depth+3,lo ; stop in m
690 bcf lo,7 ; Clear GAS_SWITCH bit 669 bcf lo,7 ; Clear GAS_SWITCH bit
691 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 670 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
692 movff char_O_deco_time+3,lo ; length of stop in min 671 movff char_O_deco_time+3,lo ; length of stop in min
693 output_99 672 output_99
701 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right 680 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right
702 return ; Done. 681 return ; Done.
703 682
704 TFT_display_deko5: 683 TFT_display_deko5:
705 WIN_SMALL decostop_5th_stop_column,decostop_5th_stop_row 684 WIN_SMALL decostop_5th_stop_column,decostop_5th_stop_row
706 lfsr FSR2,buffer
707 movff char_O_deco_depth+4,lo ; stop in m 685 movff char_O_deco_depth+4,lo ; stop in m
708 bcf lo,7 ; Clear GAS_SWITCH bit 686 bcf lo,7 ; Clear GAS_SWITCH bit
709 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 687 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
710 movff char_O_deco_time+4,lo ; length of stop in min 688 movff char_O_deco_time+4,lo ; length of stop in min
711 output_99 689 output_99
716 ; No, clear output and return 694 ; No, clear output and return
717 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right 695 WIN_BOX_BLACK decostop_6th_stop_row, divemode_simtext_row-1, decostop_6th_stop_column, .159 ; top, bottom, left, right
718 return ; Done. 696 return ; Done.
719 TFT_display_deko6: 697 TFT_display_deko6:
720 WIN_SMALL decostop_6th_stop_column,decostop_6th_stop_row 698 WIN_SMALL decostop_6th_stop_column,decostop_6th_stop_row
721 lfsr FSR2,buffer
722 movff char_O_deco_depth+5,lo ; stop in m 699 movff char_O_deco_depth+5,lo ; stop in m
723 bcf lo,7 ; Clear GAS_SWITCH bit 700 bcf lo,7 ; Clear GAS_SWITCH bit
724 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 701 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
725 movff char_O_deco_time+5,lo ; length of stop in min 702 movff char_O_deco_time+5,lo ; length of stop in min
726 output_99 703 output_99
731 ; No, clear output and return 708 ; No, clear output and return
732 WIN_BOX_BLACK decostop_7th_stop_row, divemode_simtext_row-1, decostop_7th_stop_column, .159 ; top, bottom, left, right 709 WIN_BOX_BLACK decostop_7th_stop_row, divemode_simtext_row-1, decostop_7th_stop_column, .159 ; top, bottom, left, right
733 return ; Done. 710 return ; Done.
734 TFT_display_deko7: 711 TFT_display_deko7:
735 WIN_SMALL decostop_7th_stop_column,decostop_7th_stop_row 712 WIN_SMALL decostop_7th_stop_column,decostop_7th_stop_row
736 lfsr FSR2,buffer
737 movff char_O_deco_depth+6,lo ; stop in m 713 movff char_O_deco_depth+6,lo ; stop in m
738 bcf lo,7 ; Clear GAS_SWITCH bit 714 bcf lo,7 ; Clear GAS_SWITCH bit
739 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft) 715 rcall TFT_display_deko_output_depth ; Outputs depth (stored in lo) to POSTINC2 with "m" or w/o (For ft)
740 movff char_O_deco_time+6,lo ; length of stop in min 716 movff char_O_deco_time+6,lo ; length of stop in min
741 output_99 717 output_99
766 742
767 TFT_show_safety_stop2: 743 TFT_show_safety_stop2:
768 bsf safety_stop_active ; Set flag 744 bsf safety_stop_active ; Set flag
769 rcall TFT_attention_color ; show in yellow 745 rcall TFT_attention_color ; show in yellow
770 WIN_MEDIUM safetystop_column,safetystop_row 746 WIN_MEDIUM safetystop_column,safetystop_row
771 lfsr FSR2,buffer
772 decf safety_stop_countdown,F ; Reduce countdown 747 decf safety_stop_countdown,F ; Reduce countdown
773 movff safety_stop_countdown,lo 748 movff safety_stop_countdown,lo
774 clrf hi 749 clrf hi
775 call convert_time ; converts hi:lo in seconds to mins (hi) and seconds (lo) 750 call convert_time ; converts hi:lo in seconds to mins (hi) and seconds (lo)
776 movf hi,W 751 movf hi,W
805 WIN_TINY dive_custom_dyn_mask_column,dive_custom_dyn_mask_row 780 WIN_TINY dive_custom_dyn_mask_column,dive_custom_dyn_mask_row
806 STRCPY_TEXT_PRINT tGaslist 781 STRCPY_TEXT_PRINT tGaslist
807 call TFT_standard_color 782 call TFT_standard_color
808 783
809 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row1 784 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row1
810 lfsr FSR2,buffer
811 movlw .1 785 movlw .1
812 movwf tft_gaslist_temp+0 786 movwf tft_gaslist_temp+0
813 rcall TFT_dyn_gaslist_common 787 rcall TFT_dyn_gaslist_common
814 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row2 788 WIN_SMALL dive_custom_dyn_mask_column1,dive_custom_dyn_mask_row2
815 lfsr FSR2,buffer
816 incf tft_gaslist_temp+0,F ; +1 789 incf tft_gaslist_temp+0,F ; +1
817 movf tft_gaslist_temp+0,W ; into W 790 movf tft_gaslist_temp+0,W ; into W
818 rcall TFT_dyn_gaslist_common 791 rcall TFT_dyn_gaslist_common
819 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row1 792 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row1
820 lfsr FSR2,buffer
821 incf tft_gaslist_temp+0,F ; +1 793 incf tft_gaslist_temp+0,F ; +1
822 movf tft_gaslist_temp+0,W ; into W 794 movf tft_gaslist_temp+0,W ; into W
823 rcall TFT_dyn_gaslist_common 795 rcall TFT_dyn_gaslist_common
824 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row2 796 WIN_SMALL dive_custom_dyn_mask_column2,dive_custom_dyn_mask_row2
825 lfsr FSR2,buffer
826 incf tft_gaslist_temp+0,F ; +1 797 incf tft_gaslist_temp+0,F ; +1
827 movf tft_gaslist_temp+0,W ; into W 798 movf tft_gaslist_temp+0,W ; into W
828 rcall TFT_dyn_gaslist_common 799 rcall TFT_dyn_gaslist_common
829 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 800 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
830 call TFT_standard_color 801 call TFT_standard_color
854 TFT_update_avr_stopwatch: 825 TFT_update_avr_stopwatch:
855 call TFT_standard_color 826 call TFT_standard_color
856 SAFE_2BYTE_COPY average_divesecs,lo 827 SAFE_2BYTE_COPY average_divesecs,lo
857 call convert_time ; lo=secs, hi=mins 828 call convert_time ; lo=secs, hi=mins
858 WIN_MEDIUM dive_avr_stop_column2,dive_avr_stop_row 829 WIN_MEDIUM dive_avr_stop_column2,dive_avr_stop_row
859 lfsr FSR2,buffer
860 bsf leftbind 830 bsf leftbind
861 movf hi,W 831 movf hi,W
862 movff lo,hi 832 movff lo,hi
863 movwf lo ; exchange lo and hi 833 movwf lo ; exchange lo and hi
864 output_8 834 output_8
877 movff avr_rel_pressure_total+0,lo 847 movff avr_rel_pressure_total+0,lo
878 movff avr_rel_pressure_total+1,hi 848 movff avr_rel_pressure_total+1,hi
879 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 849 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
880 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 850 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
881 WIN_MEDIUM dive_avr_stop_column1,dive_avr_stop_row 851 WIN_MEDIUM dive_avr_stop_column1,dive_avr_stop_row
882 lfsr FSR2,buffer
883 bsf leftbind 852 bsf leftbind
884 output_16 ; yxz 853 output_16 ; yxz
885 STRCAT_PRINT " " 854 STRCAT_PRINT " "
886 ; Stopped average depth 855 ; Stopped average depth
887 movff avr_rel_pressure+0,lo 856 movff avr_rel_pressure+0,lo
888 movff avr_rel_pressure+1,hi 857 movff avr_rel_pressure+1,hi
889 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 858 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
890 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 859 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
891 WIN_MEDIUM dive_avr_stop_column3,dive_avr_stop_row 860 WIN_MEDIUM dive_avr_stop_column3,dive_avr_stop_row
892 lfsr FSR2,buffer
893 output_16 ; yxz 861 output_16 ; yxz
894 bcf leftbind 862 bcf leftbind
895 STRCAT_PRINT " " 863 STRCAT_PRINT " "
896 return 864 return
897 865
899 ; Non-resettable average depth 867 ; Non-resettable average depth
900 movff avr_rel_pressure_total+0,lo 868 movff avr_rel_pressure_total+0,lo
901 movff avr_rel_pressure_total+1,hi 869 movff avr_rel_pressure_total+1,hi
902 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 870 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
903 WIN_MEDIUM dive_avr_stop_column1,dive_avr_stop_row 871 WIN_MEDIUM dive_avr_stop_column1,dive_avr_stop_row
904 lfsr FSR2,buffer
905 bsf ignore_digit5 ; no cm 872 bsf ignore_digit5 ; no cm
906 output_16dp .3 ; yxz.a 873 output_16dp .3 ; yxz.a
907 STRCAT_PRINT "" 874 STRCAT_PRINT ""
908 ; Stopped average depth 875 ; Stopped average depth
909 movff avr_rel_pressure+0,lo 876 movff avr_rel_pressure+0,lo
910 movff avr_rel_pressure+1,hi 877 movff avr_rel_pressure+1,hi
911 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 878 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
912 WIN_MEDIUM dive_avr_stop_column3,dive_avr_stop_row 879 WIN_MEDIUM dive_avr_stop_column3,dive_avr_stop_row
913 lfsr FSR2,buffer
914 bsf ignore_digit5 ; no cm 880 bsf ignore_digit5 ; no cm
915 output_16dp .3 ; yxz.a 881 output_16dp .3 ; yxz.a
916 bcf leftbind 882 bcf leftbind
917 bcf ignore_digit5 883 bcf ignore_digit5
918 STRCAT_PRINT "" 884 STRCAT_PRINT ""
928 894
929 global TFT_ceiling ; Ceiling 895 global TFT_ceiling ; Ceiling
930 TFT_ceiling: 896 TFT_ceiling:
931 call TFT_standard_color 897 call TFT_standard_color
932 WIN_MEDIUM dive_ceiling_value_column,dive_ceiling_value_row 898 WIN_MEDIUM dive_ceiling_value_column,dive_ceiling_value_row
933 lfsr FSR2,buffer
934 movff int_O_ceiling+0,lo 899 movff int_O_ceiling+0,lo
935 movff int_O_ceiling+1,hi 900 movff int_O_ceiling+1,hi
936 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 901 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
937 bsf leftbind 902 bsf leftbind
938 TSTOSS opt_units ; 0=m, 1=ft 903 TSTOSS opt_units ; 0=m, 1=ft
967 global TFT_hud_voltages 932 global TFT_hud_voltages
968 TFT_hud_voltages: ; Show HUD details 933 TFT_hud_voltages: ; Show HUD details
969 WIN_SMALL .5,dive_hud_data_row 934 WIN_SMALL .5,dive_hud_data_row
970 movff o2_mv_sensor1+0,lo 935 movff o2_mv_sensor1+0,lo
971 movff o2_mv_sensor1+1,hi 936 movff o2_mv_sensor1+1,hi
972 lfsr FSR2,buffer
973 bsf leftbind 937 bsf leftbind
974 output_16dp .4 ; x.xx 938 output_16dp .4 ; x.xx
975 bcf leftbind 939 bcf leftbind
976 STRCAT_PRINT "mV " 940 STRCAT_PRINT "mV "
977 WIN_SMALL .55,dive_hud_data_row 941 WIN_SMALL .55,dive_hud_data_row
978 movff o2_mv_sensor2+0,lo 942 movff o2_mv_sensor2+0,lo
979 movff o2_mv_sensor2+1,hi 943 movff o2_mv_sensor2+1,hi
980 lfsr FSR2,buffer
981 bsf leftbind 944 bsf leftbind
982 output_16dp .4 ; x.xx 945 output_16dp .4 ; x.xx
983 bcf leftbind 946 bcf leftbind
984 STRCAT_PRINT "mV " 947 STRCAT_PRINT "mV "
985 WIN_SMALL .105,dive_hud_data_row 948 WIN_SMALL .105,dive_hud_data_row
986 movff o2_mv_sensor3+0,lo 949 movff o2_mv_sensor3+0,lo
987 movff o2_mv_sensor3+1,hi 950 movff o2_mv_sensor3+1,hi
988 lfsr FSR2,buffer
989 bsf leftbind 951 bsf leftbind
990 output_16dp .4 ; x.xx 952 output_16dp .4 ; x.xx
991 bcf leftbind 953 bcf leftbind
992 STRCAT_PRINT "mV " 954 STRCAT_PRINT "mV "
993 return 955 return
1008 STRCPY_PRINT "---" 970 STRCPY_PRINT "---"
1009 bra TFT_update_hud2 ; Skip Sensor 1 971 bra TFT_update_hud2 ; Skip Sensor 1
1010 TFT_update_hud1: 972 TFT_update_hud1:
1011 WIN_MEDIUM dive_hud_sensor1_column,dive_hud_data_row 973 WIN_MEDIUM dive_hud_sensor1_column,dive_hud_data_row
1012 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 974 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1013 lfsr FSR2,buffer
1014 clrf hi 975 clrf hi
1015 output_16dp .3 ; x.xx bar 976 output_16dp .3 ; x.xx bar
1016 STRCAT_PRINT "" 977 STRCAT_PRINT ""
1017 bsf dive_hud1_displayed ; Set display flag 978 bsf dive_hud1_displayed ; Set display flag
1018 TFT_update_hud2: 979 TFT_update_hud2:
1028 STRCPY_PRINT "---" 989 STRCPY_PRINT "---"
1029 bra TFT_update_hud4 ; Skip Sensor 2 990 bra TFT_update_hud4 ; Skip Sensor 2
1030 TFT_update_hud3: 991 TFT_update_hud3:
1031 WIN_MEDIUM dive_hud_sensor2_column,dive_hud_data_row 992 WIN_MEDIUM dive_hud_sensor2_column,dive_hud_data_row
1032 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 993 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1033 lfsr FSR2,buffer
1034 clrf hi 994 clrf hi
1035 output_16dp .3 ; x.xx bar 995 output_16dp .3 ; x.xx bar
1036 STRCAT_PRINT "" 996 STRCAT_PRINT ""
1037 bsf dive_hud2_displayed ; Set display flag 997 bsf dive_hud2_displayed ; Set display flag
1038 TFT_update_hud4: 998 TFT_update_hud4:
1048 STRCPY_PRINT "---" 1008 STRCPY_PRINT "---"
1049 bra TFT_update_hud6 ; Skip Sensor 3 1009 bra TFT_update_hud6 ; Skip Sensor 3
1050 TFT_update_hud5: 1010 TFT_update_hud5:
1051 WIN_MEDIUM dive_hud_sensor3_column,dive_hud_data_row 1011 WIN_MEDIUM dive_hud_sensor3_column,dive_hud_data_row
1052 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 1012 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1053 lfsr FSR2,buffer
1054 clrf hi 1013 clrf hi
1055 output_16dp .3 ; x.xx bar 1014 output_16dp .3 ; x.xx bar
1056 STRCAT_PRINT "" 1015 STRCAT_PRINT ""
1057 bsf dive_hud3_displayed ; Set display flag 1016 bsf dive_hud3_displayed ; Set display flag
1058 TFT_update_hud6: 1017 TFT_update_hud6:
1071 call TFT_standard_color 1030 call TFT_standard_color
1072 STRCPY_PRINT "--- " 1031 STRCPY_PRINT "--- "
1073 bra TFT_surface_hud2 ; Skip Sensor 1 1032 bra TFT_surface_hud2 ; Skip Sensor 1
1074 TFT_surface_hud1: 1033 TFT_surface_hud1:
1075 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 1034 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1076 lfsr FSR2,buffer
1077 clrf hi 1035 clrf hi
1078 output_16dp .3 ; x.xx bar 1036 output_16dp .3 ; x.xx bar
1079 STRCAT_PRINT "" 1037 STRCAT_PRINT ""
1080 TFT_surface_hud2: 1038 TFT_surface_hud2:
1081 WIN_SMALL surf_hud_sensor2_column,surf_hud_sensor2_row 1039 WIN_SMALL surf_hud_sensor2_column,surf_hud_sensor2_row
1085 call TFT_standard_color 1043 call TFT_standard_color
1086 STRCPY_PRINT "--- " 1044 STRCPY_PRINT "--- "
1087 bra TFT_surface_hud4 ; Skip Sensor 2 1045 bra TFT_surface_hud4 ; Skip Sensor 2
1088 TFT_surface_hud3: 1046 TFT_surface_hud3:
1089 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 1047 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1090 lfsr FSR2,buffer
1091 clrf hi 1048 clrf hi
1092 output_16dp .3 ; x.xx bar 1049 output_16dp .3 ; x.xx bar
1093 STRCAT_PRINT "" 1050 STRCAT_PRINT ""
1094 TFT_surface_hud4: 1051 TFT_surface_hud4:
1095 WIN_SMALL surf_hud_sensor3_column,surf_hud_sensor3_row 1052 WIN_SMALL surf_hud_sensor3_column,surf_hud_sensor3_row
1099 call TFT_standard_color 1056 call TFT_standard_color
1100 STRCPY_PRINT "--- " 1057 STRCPY_PRINT "--- "
1101 bra TFT_surface_hud6 ; Skip Sensor 3 1058 bra TFT_surface_hud6 ; Skip Sensor 3
1102 TFT_surface_hud5: 1059 TFT_surface_hud5:
1103 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 1060 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
1104 lfsr FSR2,buffer
1105 clrf hi 1061 clrf hi
1106 output_16dp .3 ; x.xx bar 1062 output_16dp .3 ; x.xx bar
1107 STRCAT_PRINT "" 1063 STRCAT_PRINT ""
1108 TFT_surface_hud6: 1064 TFT_surface_hud6:
1109 bcf leftbind 1065 bcf leftbind
1113 global TFT_menu_hud 1069 global TFT_menu_hud
1114 TFT_menu_hud: ; Yes, update HUD data 1070 TFT_menu_hud: ; Yes, update HUD data
1115 call TFT_attention_color ; show in yellow 1071 call TFT_attention_color ; show in yellow
1116 bsf leftbind 1072 bsf leftbind
1117 WIN_SMALL surf_menu_sensor1_column,surf_menu_sensor1_row 1073 WIN_SMALL surf_menu_sensor1_column,surf_menu_sensor1_row
1118 lfsr FSR2,buffer
1119 movff o2_ppo2_sensor1,lo 1074 movff o2_ppo2_sensor1,lo
1120 clrf hi 1075 clrf hi
1121 output_16dp .3 ; x.xx bar 1076 output_16dp .3 ; x.xx bar
1122 PUTC "," 1077 PUTC ","
1123 movff o2_mv_sensor1+0,lo ; in 0.1mV steps 1078 movff o2_mv_sensor1+0,lo ; in 0.1mV steps
1124 movff o2_mv_sensor1+1,hi ; in 0.1mV steps 1079 movff o2_mv_sensor1+1,hi ; in 0.1mV steps
1125 output_16dp .4 ; xxx.y mV 1080 output_16dp .4 ; xxx.y mV
1126 STRCAT_PRINT "mV " 1081 STRCAT_PRINT "mV "
1127 WIN_SMALL surf_menu_sensor2_column,surf_menu_sensor2_row 1082 WIN_SMALL surf_menu_sensor2_column,surf_menu_sensor2_row
1128 lfsr FSR2,buffer
1129 movff o2_ppo2_sensor2,lo 1083 movff o2_ppo2_sensor2,lo
1130 clrf hi 1084 clrf hi
1131 output_16dp .3 ; x.xx bar 1085 output_16dp .3 ; x.xx bar
1132 PUTC "," 1086 PUTC ","
1133 movff o2_mv_sensor2+0,lo ; in 0.1mV steps 1087 movff o2_mv_sensor2+0,lo ; in 0.1mV steps
1134 movff o2_mv_sensor2+1,hi ; in 0.1mV steps 1088 movff o2_mv_sensor2+1,hi ; in 0.1mV steps
1135 output_16dp .4 ; xxx.y mV 1089 output_16dp .4 ; xxx.y mV
1136 STRCAT_PRINT "mV " 1090 STRCAT_PRINT "mV "
1137 WIN_SMALL surf_menu_sensor3_column,surf_menu_sensor3_row 1091 WIN_SMALL surf_menu_sensor3_column,surf_menu_sensor3_row
1138 lfsr FSR2,buffer
1139 movff o2_ppo2_sensor3,lo 1092 movff o2_ppo2_sensor3,lo
1140 clrf hi 1093 clrf hi
1141 output_16dp .3 ; x.xx bar 1094 output_16dp .3 ; x.xx bar
1142 PUTC "," 1095 PUTC ","
1143 movff o2_mv_sensor3+0,lo ; in 0.1mV steps 1096 movff o2_mv_sensor3+0,lo ; in 0.1mV steps
1149 btfss c3_hardware 1102 btfss c3_hardware
1150 bra TFT_menu_hud_2 ; always for normal OSTC3 1103 bra TFT_menu_hud_2 ; always for normal OSTC3
1151 btfss s8_digital 1104 btfss s8_digital
1152 return ; Not for analog 1105 return ; Not for analog
1153 TFT_menu_hud_2: 1106 TFT_menu_hud_2:
1154 lfsr FSR2,buffer
1155 STRCPY "Batt:" 1107 STRCPY "Batt:"
1156 movff hud_battery_mv+0,lo ; in mV 1108 movff hud_battery_mv+0,lo ; in mV
1157 movff hud_battery_mv+1,hi ; in mV 1109 movff hud_battery_mv+1,hi ; in mV
1158 output_16dp .2 ; x.yyy V 1110 output_16dp .2 ; x.yyy V
1159 STRCAT_PRINT "V" 1111 STRCAT_PRINT "V"
1164 global TFT_menu_hud2 1116 global TFT_menu_hud2
1165 TFT_menu_hud2: ; Yes, update mV data 1117 TFT_menu_hud2: ; Yes, update mV data
1166 call TFT_attention_color ; show in yellow 1118 call TFT_attention_color ; show in yellow
1167 bsf leftbind 1119 bsf leftbind
1168 WIN_SMALL surf_menu_sensor1_column,surf_menu2_sensor1_row 1120 WIN_SMALL surf_menu_sensor1_column,surf_menu2_sensor1_row
1169 lfsr FSR2,buffer
1170 movff o2_mv_sensor1+0,lo ; in 0.1mV steps 1121 movff o2_mv_sensor1+0,lo ; in 0.1mV steps
1171 movff o2_mv_sensor1+1,hi ; in 0.1mV steps 1122 movff o2_mv_sensor1+1,hi ; in 0.1mV steps
1172 output_16dp .4 ; xxx.y mV 1123 output_16dp .4 ; xxx.y mV
1173 STRCAT_PRINT "mV " 1124 STRCAT_PRINT "mV "
1174 WIN_SMALL surf_menu_sensor2_column,surf_menu2_sensor2_row 1125 WIN_SMALL surf_menu_sensor2_column,surf_menu2_sensor2_row
1175 lfsr FSR2,buffer
1176 movff o2_mv_sensor2+0,lo ; in 0.1mV steps 1126 movff o2_mv_sensor2+0,lo ; in 0.1mV steps
1177 movff o2_mv_sensor2+1,hi ; in 0.1mV steps 1127 movff o2_mv_sensor2+1,hi ; in 0.1mV steps
1178 output_16dp .4 ; xxx.y mV 1128 output_16dp .4 ; xxx.y mV
1179 STRCAT_PRINT "mV " 1129 STRCAT_PRINT "mV "
1180 WIN_SMALL surf_menu_sensor3_column,surf_menu2_sensor3_row 1130 WIN_SMALL surf_menu_sensor3_column,surf_menu2_sensor3_row
1181 lfsr FSR2,buffer
1182 movff o2_mv_sensor3+0,lo ; in 0.1mV steps 1131 movff o2_mv_sensor3+0,lo ; in 0.1mV steps
1183 movff o2_mv_sensor3+1,hi ; in 0.1mV steps 1132 movff o2_mv_sensor3+1,hi ; in 0.1mV steps
1184 output_16dp .4 ; xxx.y mV 1133 output_16dp .4 ; xxx.y mV
1185 STRCAT_PRINT "mV " 1134 STRCAT_PRINT "mV "
1186 call TFT_standard_color 1135 call TFT_standard_color
1190 global TFT_clock 1139 global TFT_clock
1191 TFT_clock: 1140 TFT_clock:
1192 WIN_SMALL surf_clock_column,surf_clock_row 1141 WIN_SMALL surf_clock_column,surf_clock_row
1193 TFT_clock2: ; called from divemode clock 1142 TFT_clock2: ; called from divemode clock
1194 call TFT_standard_color 1143 call TFT_standard_color
1195 lfsr FSR2,buffer
1196 movff hours,lo 1144 movff hours,lo
1197 output_99 1145 output_99
1198 movlw ':' 1146 movlw ':'
1199 btfss secs,0 ; blinking every second 1147 btfss secs,0 ; blinking every second
1200 movlw ' ' 1148 movlw ' '
1207 global TFT_show_time_date_menu 1155 global TFT_show_time_date_menu
1208 TFT_show_time_date_menu: 1156 TFT_show_time_date_menu:
1209 call speed_fastest 1157 call speed_fastest
1210 WIN_SMALL .15,.30 1158 WIN_SMALL .15,.30
1211 call TFT_standard_color 1159 call TFT_standard_color
1212 lfsr FSR2,buffer
1213 movff hours,lo 1160 movff hours,lo
1214 output_99 1161 output_99
1215 PUTC ':' 1162 PUTC ':'
1216 movff mins,lo 1163 movff mins,lo
1217 output_99x 1164 output_99x
1817 return 1764 return
1818 TFT_surface_compass_heading2: 1765 TFT_surface_compass_heading2:
1819 WIN_STD surf_compass_head_column,surf_compass_head_row 1766 WIN_STD surf_compass_head_column,surf_compass_head_row
1820 call TFT_standard_color 1767 call TFT_standard_color
1821 TFT_surface_compass_heading_com: ; Show "000° N" 1768 TFT_surface_compass_heading_com: ; Show "000° N"
1822 lfsr FSR2,buffer
1823 movff compass_heading+0,lo 1769 movff compass_heading+0,lo
1824 movff compass_heading+1,hi 1770 movff compass_heading+1,hi
1825 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required 1771 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required
1826 bsf leftbind 1772 bsf leftbind
1827 output_16dp .2 ; Result is "0.000" 1773 output_16dp .2 ; Result is "0.000"
1873 TFT_dive_compass_heading_graph1: 1819 TFT_dive_compass_heading_graph1:
1874 WIN_SMALL dive_compass_head_column+.70,dive_compass_head_row 1820 WIN_SMALL dive_compass_head_column+.70,dive_compass_head_row
1875 movff sub_c+0,lo 1821 movff sub_c+0,lo
1876 movff sub_c+1,hi 1822 movff sub_c+1,hi
1877 call TFT_standard_color 1823 call TFT_standard_color
1878 lfsr FSR2,buffer
1879 bsf leftbind 1824 bsf leftbind
1880 output_16 1825 output_16
1881 bcf leftbind 1826 bcf leftbind
1882 STRCAT_PRINT " " 1827 STRCAT_PRINT " "
1883 1828
2146 WIN_SMALL surf_temp_column+4*8,surf_temp_row 2091 WIN_SMALL surf_temp_column+4*8,surf_temp_row
2147 STRCPY_PRINT "°F" 2092 STRCPY_PRINT "°F"
2148 return 2093 return
2149 2094
2150 TFT_temp_surfmode_metric: 2095 TFT_temp_surfmode_metric:
2151 lfsr FSR2,buffer
2152 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required 2096 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required
2153 movlw d'3' 2097 movlw d'3'
2154 movwf ignore_digits 2098 movwf ignore_digits
2155 bsf ignore_digit5 ; Full degrees only 2099 bsf ignore_digit5 ; Full degrees only
2156 output_16 2100 output_16
2238 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) 2182 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
2239 STRCAT_PRINT "" 2183 STRCAT_PRINT ""
2240 return ; Done. 2184 return ; Done.
2241 2185
2242 TFT_temp_divemode_metric: 2186 TFT_temp_divemode_metric:
2243 lfsr FSR2,buffer
2244 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required 2187 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required
2245 movlw d'3' 2188 movlw d'3'
2246 movwf ignore_digits 2189 movwf ignore_digits
2247 bsf ignore_digit5 ; Full degrees only 2190 bsf ignore_digit5 ; Full degrees only
2248 output_16 2191 output_16
2253 WIN_STD active_gas_column,active_gas_row 2196 WIN_STD active_gas_column,active_gas_row
2254 call TFT_standard_color 2197 call TFT_standard_color
2255 btfsc is_bailout ; =1: Bailout 2198 btfsc is_bailout ; =1: Bailout
2256 bra TFT_active_setpoint_bail ; Show "Bailout" instead of Setpoint 2199 bra TFT_active_setpoint_bail ; Show "Bailout" instead of Setpoint
2257 2200
2258 lfsr FSR2,buffer
2259 movff char_I_const_ppO2,lo 2201 movff char_I_const_ppO2,lo
2260 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo 2202 TFT_color_code warn_ppo2_hud ; With ppO2 [cbar] in lo
2261 clrf hi 2203 clrf hi
2262 bsf leftbind 2204 bsf leftbind
2263 output_16dp d'3' 2205 output_16dp d'3'
2290 WIN_INVERT .0 ; Init new Wordprocessor 2232 WIN_INVERT .0 ; Init new Wordprocessor
2291 call TFT_standard_color 2233 call TFT_standard_color
2292 return ; Done. 2234 return ; Done.
2293 2235
2294 TFT_show_dil_divemode2: 2236 TFT_show_dil_divemode2:
2295 lfsr FSR2,buffer
2296 call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 2237 call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2
2297 STRCAT_PRINT "" 2238 STRCAT_PRINT ""
2298 return 2239 return
2299 2240
2300 TFT_active_setpoint_bail: 2241 TFT_active_setpoint_bail:
2329 WIN_INVERT .0 ; Init new Wordprocessor 2270 WIN_INVERT .0 ; Init new Wordprocessor
2330 call TFT_standard_color 2271 call TFT_standard_color
2331 return ; Done. 2272 return ; Done.
2332 2273
2333 TFT_active_gas_divemode2: 2274 TFT_active_gas_divemode2:
2334 lfsr FSR2,buffer
2335 call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 2275 call customview_show_mix ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2
2336 STRCAT_PRINT "" 2276 STRCAT_PRINT ""
2337 return 2277 return
2338 2278
2339 global TFT_display_decotype_surface 2279 global TFT_display_decotype_surface
2340 TFT_display_decotype_surface: 2280 TFT_display_decotype_surface:
2341 WIN_STD surf_decotype_column,surf_decotype_row 2281 WIN_STD surf_decotype_column,surf_decotype_row
2342 WIN_COLOR color_lightblue 2282 WIN_COLOR color_lightblue
2343 lfsr FSR2,buffer
2344 movff opt_dive_mode,lo ; 0=OC, 1=CC, 2=Gauge, 3=Apnea 2283 movff opt_dive_mode,lo ; 0=OC, 1=CC, 2=Gauge, 3=Apnea
2345 tstfsz lo 2284 tstfsz lo
2346 bra TFT_display_decotype_surface2 2285 bra TFT_display_decotype_surface2
2347 TFT_display_decotype_surface0: 2286 TFT_display_decotype_surface0:
2348 STRCAT_TEXT_PRINT tDvOC ; OC 2287 STRCAT_TEXT_PRINT tDvOC ; OC
2396 extern gaslist_strcat_setpoint 2335 extern gaslist_strcat_setpoint
2397 TFT_splist_surfmode: 2336 TFT_splist_surfmode:
2398 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2337 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2399 ;SP 1 2338 ;SP 1
2400 WIN_SMALL surf_gaslist_column,surf_gaslist_row 2339 WIN_SMALL surf_gaslist_column,surf_gaslist_row
2401 lfsr FSR2,buffer
2402 clrf PRODL 2340 clrf PRODL
2403 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL# 2341 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL#
2404 STRCAT_PRINT "" 2342 STRCAT_PRINT ""
2405 ;SP 2 2343 ;SP 2
2406 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1) 2344 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1)
2407 lfsr FSR2,buffer
2408 movlw .1 2345 movlw .1
2409 movwf PRODL 2346 movwf PRODL
2410 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL# 2347 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL#
2411 STRCAT_PRINT "" 2348 STRCAT_PRINT ""
2412 ;SP 3 2349 ;SP 3
2413 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2) 2350 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2)
2414 lfsr FSR2,buffer
2415 movlw .2 2351 movlw .2
2416 movwf PRODL 2352 movwf PRODL
2417 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL# 2353 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL#
2418 STRCAT_PRINT "" 2354 STRCAT_PRINT ""
2419 ;SP 4 2355 ;SP 4
2420 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3) 2356 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3)
2421 lfsr FSR2,buffer
2422 movlw .3 2357 movlw .3
2423 movwf PRODL 2358 movwf PRODL
2424 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL# 2359 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL#
2425 STRCAT_PRINT "" 2360 STRCAT_PRINT ""
2426 ;SP 5 2361 ;SP 5
2427 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4) 2362 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4)
2428 lfsr FSR2,buffer
2429 movlw .4 2363 movlw .4
2430 movwf PRODL 2364 movwf PRODL
2431 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL# 2365 call gaslist_strcat_setpoint ; Show SP#+1 of PRODL#
2432 STRCAT_PRINT "" 2366 STRCAT_PRINT ""
2433 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2367 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2438 TFT_gaslist_surfmode: ; Displays Gas List 2372 TFT_gaslist_surfmode: ; Displays Gas List
2439 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2373 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2440 extern gaslist_strcat_gas_mod 2374 extern gaslist_strcat_gas_mod
2441 ;Gas 1 2375 ;Gas 1
2442 WIN_SMALL surf_gaslist_column,surf_gaslist_row 2376 WIN_SMALL surf_gaslist_column,surf_gaslist_row
2443 lfsr FSR2,buffer
2444 movlw .0 2377 movlw .0
2445 movwf PRODL 2378 movwf PRODL
2446 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2379 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2447 STRCAT_PRINT "" 2380 STRCAT_PRINT ""
2448 ;Gas 2 2381 ;Gas 2
2449 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1) 2382 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1)
2450 lfsr FSR2,buffer
2451 movlw .1 2383 movlw .1
2452 movwf PRODL 2384 movwf PRODL
2453 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2385 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2454 STRCAT_PRINT "" 2386 STRCAT_PRINT ""
2455 ;Gas 3 2387 ;Gas 3
2456 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2) 2388 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2)
2457 lfsr FSR2,buffer
2458 movlw .2 2389 movlw .2
2459 movwf PRODL 2390 movwf PRODL
2460 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2391 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2461 STRCAT_PRINT "" 2392 STRCAT_PRINT ""
2462 ;Gas 4 2393 ;Gas 4
2463 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3) 2394 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3)
2464 lfsr FSR2,buffer
2465 movlw .3 2395 movlw .3
2466 movwf PRODL 2396 movwf PRODL
2467 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2397 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2468 STRCAT_PRINT "" 2398 STRCAT_PRINT ""
2469 ;Gas 5 2399 ;Gas 5
2470 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4) 2400 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4)
2471 lfsr FSR2,buffer
2472 movlw .4 2401 movlw .4
2473 movwf PRODL 2402 movwf PRODL
2474 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2403 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2475 STRCAT_PRINT "" 2404 STRCAT_PRINT ""
2476 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2405 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2480 global TFT_dillist_surfmode 2409 global TFT_dillist_surfmode
2481 TFT_dillist_surfmode: ; Displays Diluent List 2410 TFT_dillist_surfmode: ; Displays Diluent List
2482 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2411 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2483 ;Dil 1 2412 ;Dil 1
2484 WIN_SMALL surf_gaslist_column,surf_gaslist_row 2413 WIN_SMALL surf_gaslist_column,surf_gaslist_row
2485 lfsr FSR2,buffer
2486 movlw .5 2414 movlw .5
2487 movwf PRODL 2415 movwf PRODL
2488 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2416 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2489 STRCAT_PRINT "" 2417 STRCAT_PRINT ""
2490 ;Dil 2 2418 ;Dil 2
2491 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1) 2419 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.1)
2492 lfsr FSR2,buffer
2493 movlw .6 2420 movlw .6
2494 movwf PRODL 2421 movwf PRODL
2495 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2422 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2496 STRCAT_PRINT "" 2423 STRCAT_PRINT ""
2497 ;Dil 3 2424 ;Dil 3
2498 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2) 2425 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.2)
2499 lfsr FSR2,buffer
2500 movlw .7 2426 movlw .7
2501 movwf PRODL 2427 movwf PRODL
2502 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2428 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2503 STRCAT_PRINT "" 2429 STRCAT_PRINT ""
2504 ;Dil 4 2430 ;Dil 4
2505 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3) 2431 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.3)
2506 lfsr FSR2,buffer
2507 movlw .8 2432 movlw .8
2508 movwf PRODL 2433 movwf PRODL
2509 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2434 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2510 STRCAT_PRINT "" 2435 STRCAT_PRINT ""
2511 ;Dil 5 2436 ;Dil 5
2512 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4) 2437 WIN_SMALL surf_gaslist_column,surf_gaslist_row+(surf_gaslist_spacing*.4)
2513 lfsr FSR2,buffer
2514 movlw .9 2438 movlw .9
2515 movwf PRODL 2439 movwf PRODL
2516 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string 2440 call gaslist_strcat_gas_mod ;Append gas description of gas #PRODL (0-4) to current string
2517 STRCAT_PRINT "" 2441 STRCAT_PRINT ""
2518 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 2442 bcf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
2526 2450
2527 TSTOSS opt_units ; 0=m, 1=ft 2451 TSTOSS opt_units ; 0=m, 1=ft
2528 bra TFT_depth_metric 2452 bra TFT_depth_metric
2529 ;TFT_depth_imperial 2453 ;TFT_depth_imperial
2530 WIN_LARGE depth_feet_column,depth_feet_row 2454 WIN_LARGE depth_feet_column,depth_feet_row
2531 lfsr FSR2,buffer
2532 TFT_color_code warn_depth ; Color-code the output 2455 TFT_color_code warn_depth ; Color-code the output
2533 2456
2534 clrf sub_a+1 ; Display 0ft if lower then 30cm 2457 clrf sub_a+1 ; Display 0ft if lower then 30cm
2535 movlw d'30' 2458 movlw d'30'
2536 movwf sub_a+0 2459 movwf sub_a+0
2567 2490
2568 movlw .039 2491 movlw .039
2569 cpfslt hi 2492 cpfslt hi
2570 bra depth_greater_99_84mtr 2493 bra depth_greater_99_84mtr
2571 2494
2572 lfsr FSR2,buffer
2573 movlw HIGH d'1000' 2495 movlw HIGH d'1000'
2574 movwf sub_a+1 2496 movwf sub_a+1
2575 movlw LOW d'1000' 2497 movlw LOW d'1000'
2576 movwf sub_a+0 2498 movwf sub_a+0
2577 movff hi,sub_b+1 2499 movff hi,sub_b+1
2611 TFT_color_code warn_depth ; Color-code the output 2533 TFT_color_code warn_depth ; Color-code the output
2612 2534
2613 SAFE_2BYTE_COPY rel_pressure, lo 2535 SAFE_2BYTE_COPY rel_pressure, lo
2614 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 2536 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
2615 2537
2616 lfsr FSR2,buffer
2617 PUTC "." 2538 PUTC "."
2618 movlw HIGH d'30' ; Display 0.0m if lower then 30cm 2539 movlw HIGH d'30' ; Display 0.0m if lower then 30cm
2619 movwf sub_a+1 2540 movwf sub_a+1
2620 movlw LOW d'30' 2541 movlw LOW d'30'
2621 movwf sub_a+0 2542 movwf sub_a+0
2763 global TFT_update_surf_press 2684 global TFT_update_surf_press
2764 TFT_update_surf_press: 2685 TFT_update_surf_press:
2765 WIN_SMALL surf_press_column,surf_press_row 2686 WIN_SMALL surf_press_column,surf_press_row
2766 call TFT_standard_color 2687 call TFT_standard_color
2767 SAFE_2BYTE_COPY amb_pressure, lo 2688 SAFE_2BYTE_COPY amb_pressure, lo
2768 lfsr FSR2,buffer
2769 movff lo,sub_a+0 2689 movff lo,sub_a+0
2770 movff hi,sub_a+1 2690 movff hi,sub_a+1
2771 movff last_surfpressure_30min+0,sub_b+0 2691 movff last_surfpressure_30min+0,sub_b+0
2772 movff last_surfpressure_30min+1,sub_b+1 2692 movff last_surfpressure_30min+1,sub_b+1
2773 call subU16 ; sub_c = sub_a - sub_b 2693 call subU16 ; sub_c = sub_a - sub_b
2810 global TFT_update_batt_voltage 2730 global TFT_update_batt_voltage
2811 TFT_update_batt_voltage: 2731 TFT_update_batt_voltage:
2812 movff batt_percent,lo ; Get battery percent 2732 movff batt_percent,lo ; Get battery percent
2813 TFT_color_code warn_battery; Color-code battery percent 2733 TFT_color_code warn_battery; Color-code battery percent
2814 WIN_TINY batt_percent_column,batt_percent_row 2734 WIN_TINY batt_percent_column,batt_percent_row
2815 lfsr FSR2,buffer
2816 bsf leftbind 2735 bsf leftbind
2817 output_8 2736 output_8
2818 bcf leftbind 2737 bcf leftbind
2819 STRCAT "% " 2738 STRCAT "% "
2820 movlw 0x00 2739 movlw 0x00
2821 movff WREG,buffer+4 ; Only "xxx%" 2740 movff WREG,buffer+4 ; Only "xxx%"
2822 STRCAT_PRINT "" 2741 STRCAT_PRINT ""
2823 call TFT_standard_color 2742 call TFT_standard_color
2824 WIN_TINY batt_voltage_column,batt_voltage_row 2743 WIN_TINY batt_voltage_column,batt_voltage_row
2825 lfsr FSR2,buffer
2826 movff batt_voltage+0,lo 2744 movff batt_voltage+0,lo
2827 movff batt_voltage+1,hi 2745 movff batt_voltage+1,hi
2828 bsf leftbind 2746 bsf leftbind
2829 output_16dp .2 2747 output_16dp .2
2830 bcf leftbind 2748 bcf leftbind
2836 return 2754 return
2837 2755
2838 ;update_battery_debug: 2756 ;update_battery_debug:
2839 ; call TFT_standard_color 2757 ; call TFT_standard_color
2840 ; WIN_TINY .70,.0 2758 ; WIN_TINY .70,.0
2841 ; lfsr FSR2,buffer
2842 ; movff battery_gauge+5,xC+3 2759 ; movff battery_gauge+5,xC+3
2843 ; movff battery_gauge+4,xC+2 2760 ; movff battery_gauge+4,xC+2
2844 ; movff battery_gauge+3,xC+1 2761 ; movff battery_gauge+3,xC+1
2845 ; movff battery_gauge+2,xC+0 2762 ; movff battery_gauge+2,xC+0
2846 ; ; battery_gauge:6 is nAs 2763 ; ; battery_gauge:6 is nAs
2966 2883
2967 global TFT_date 2884 global TFT_date
2968 TFT_date: 2885 TFT_date:
2969 WIN_SMALL surf_date_column,surf_date_row ; Init new Wordprocessor 2886 WIN_SMALL surf_date_column,surf_date_row ; Init new Wordprocessor
2970 call TFT_standard_color 2887 call TFT_standard_color
2971 lfsr FSR2,buffer
2972 movff month,convert_value_temp+0 2888 movff month,convert_value_temp+0
2973 movff day,convert_value_temp+1 2889 movff day,convert_value_temp+1
2974 movff year,convert_value_temp+2 2890 movff year,convert_value_temp+2
2975 call TFT_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 2891 call TFT_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
2976 STRCAT_PRINT "" 2892 STRCAT_PRINT ""
2989 TSTOSS opt_units ; 0=m, 1=ft 2905 TSTOSS opt_units ; 0=m, 1=ft
2990 bra TFT_max_pressure2_metric 2906 bra TFT_max_pressure2_metric
2991 ;TFT_max_pressure2_imperial 2907 ;TFT_max_pressure2_imperial
2992 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 2908 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
2993 WIN_MEDIUM max_depth_feet_column,max_depth_feet_row 2909 WIN_MEDIUM max_depth_feet_column,max_depth_feet_row
2994 lfsr FSR2,buffer
2995 call TFT_standard_color 2910 call TFT_standard_color
2996 output_16_3 2911 output_16_3
2997 STRCAT_PRINT "" 2912 STRCAT_PRINT ""
2998 return 2913 return
2999 2914
3010 2925
3011 movlw .039 2926 movlw .039
3012 cpfslt hi 2927 cpfslt hi
3013 bra max_depth_greater_99_84mtr 2928 bra max_depth_greater_99_84mtr
3014 2929
3015 lfsr FSR2,buffer
3016 movlw HIGH d'1000' 2930 movlw HIGH d'1000'
3017 movwf sub_a+1 2931 movwf sub_a+1
3018 movlw LOW d'1000' 2932 movlw LOW d'1000'
3019 movwf sub_a+0 2933 movwf sub_a+0
3020 movff hi,sub_b+1 2934 movff hi,sub_b+1
3054 WIN_SMALL max_depth_dm_column,max_depth_dm_row 2968 WIN_SMALL max_depth_dm_column,max_depth_dm_row
3055 2969
3056 SAFE_2BYTE_COPY max_pressure, lo 2970 SAFE_2BYTE_COPY max_pressure, lo
3057 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 2971 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
3058 2972
3059 lfsr FSR2,buffer
3060 PUTC "." 2973 PUTC "."
3061 2974
3062 movlw d'4' 2975 movlw d'4'
3063 movwf ignore_digits 2976 movwf ignore_digits
3064 bsf ignore_digit5 2977 bsf ignore_digit5
3107 TSTOSS opt_units ; 0=m, 1=ft 3020 TSTOSS opt_units ; 0=m, 1=ft
3108 bra TFT_display_apnoe_last_m_metric 3021 bra TFT_display_apnoe_last_m_metric
3109 ;TFT_display_apnoe_last_max_imperial 3022 ;TFT_display_apnoe_last_max_imperial
3110 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 3023 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
3111 WIN_MEDIUM apnoe_last_max_depth_column,apnoe_last_max_depth_row 3024 WIN_MEDIUM apnoe_last_max_depth_column,apnoe_last_max_depth_row
3112 lfsr FSR2,buffer
3113 output_16 3025 output_16
3114 STRCAT_PRINT "" 3026 STRCAT_PRINT ""
3115 return 3027 return
3116 3028
3117 TFT_display_apnoe_last_m_metric: 3029 TFT_display_apnoe_last_m_metric:
3118 WIN_MEDIUM apnoe_last_max_depth_column,apnoe_last_max_depth_row 3030 WIN_MEDIUM apnoe_last_max_depth_column,apnoe_last_max_depth_row
3119 lfsr FSR2,buffer
3120 bsf ignore_digit5 ; do not display 1cm depth 3031 bsf ignore_digit5 ; do not display 1cm depth
3121 output_16dp d'3' 3032 output_16dp d'3'
3122 STRCAT_PRINT "" 3033 STRCAT_PRINT ""
3123 return 3034 return
3124 3035
3141 WIN_BOX_BLACK divetime_row, warning1_row,divetime_column,.159 ;top, bottom, left, right 3052 WIN_BOX_BLACK divetime_row, warning1_row,divetime_column,.159 ;top, bottom, left, right
3142 bra TFT_divemins2 ; Show minutes only 3053 bra TFT_divemins2 ; Show minutes only
3143 3054
3144 TFT_divemins1: 3055 TFT_divemins1:
3145 WIN_MEDIUM divetime_column, divetime_row 3056 WIN_MEDIUM divetime_column, divetime_row
3146 lfsr FSR2,buffer
3147 output_16_3 ; displays only last three figures from a 16Bit value (0-999) 3057 output_16_3 ; displays only last three figures from a 16Bit value (0-999)
3148 call TFT_standard_color 3058 call TFT_standard_color
3149 STRCAT_PRINT "" ; Show minutes in large font 3059 STRCAT_PRINT "" ; Show minutes in large font
3150 3060
3151 WIN_SMALL divetime_secs_column, divetime_secs_row ; left position for two sec figures 3061 WIN_SMALL divetime_secs_column, divetime_secs_row ; left position for two sec figures
3152 lfsr FSR2,buffer
3153 PUTC ':' 3062 PUTC ':'
3154 bsf leftbind 3063 bsf leftbind
3155 movff divesecs,lo 3064 movff divesecs,lo
3156 output_99x 3065 output_99x
3157 bcf leftbind 3066 bcf leftbind
3158 STRCAT_PRINT "" ; Show seconds in small font 3067 STRCAT_PRINT "" ; Show seconds in small font
3159 return 3068 return
3160 3069
3161 TFT_divemins2: 3070 TFT_divemins2:
3162 WIN_MEDIUM divetime_minsonly_column, divetime_row 3071 WIN_MEDIUM divetime_minsonly_column, divetime_row
3163 lfsr FSR2,buffer
3164 output_16 3072 output_16
3165 call TFT_standard_color 3073 call TFT_standard_color
3166 STRCAT_PRINT "" ; Show minutes in large font 3074 STRCAT_PRINT "" ; Show minutes in large font
3167 return 3075 return
3168 3076
3174 STRCPY_TEXT_PRINT tApnoeSurface 3082 STRCPY_TEXT_PRINT tApnoeSurface
3175 3083
3176 call TFT_standard_color 3084 call TFT_standard_color
3177 WIN_MEDIUM surface_time_apnoe_column, surface_time_apnoe_row 3085 WIN_MEDIUM surface_time_apnoe_column, surface_time_apnoe_row
3178 movff apnoe_surface_mins,lo 3086 movff apnoe_surface_mins,lo
3179 lfsr FSR2,buffer
3180 output_8 3087 output_8
3181 PUTC ':' 3088 PUTC ':'
3182 movff apnoe_surface_secs,lo 3089 movff apnoe_surface_secs,lo
3183 output_99x 3090 output_99x
3184 STRCAT_PRINT "" 3091 STRCAT_PRINT ""
3193 global TFT_display_apnoe_descent 3100 global TFT_display_apnoe_descent
3194 TFT_display_apnoe_descent: ; Descent divetime 3101 TFT_display_apnoe_descent: ; Descent divetime
3195 movff apnoe_mins,lo 3102 movff apnoe_mins,lo
3196 clrf hi 3103 clrf hi
3197 WIN_MEDIUM divetime_column, divetime_row 3104 WIN_MEDIUM divetime_column, divetime_row
3198 lfsr FSR2,buffer
3199 output_16_3 ; displays only last three figures from a 16Bit value (0-999) 3105 output_16_3 ; displays only last three figures from a 16Bit value (0-999)
3200 call TFT_standard_color 3106 call TFT_standard_color
3201 STRCAT_PRINT "" ; Show minutes in large font 3107 STRCAT_PRINT "" ; Show minutes in large font
3202 WIN_SMALL divetime_secs_column, divetime_secs_row ; left position for two sec figures 3108 WIN_SMALL divetime_secs_column, divetime_secs_row ; left position for two sec figures
3203 lfsr FSR2,buffer
3204 PUTC ':' 3109 PUTC ':'
3205 bsf leftbind 3110 bsf leftbind
3206 movff apnoe_secs,lo 3111 movff apnoe_secs,lo
3207 output_99x 3112 output_99x
3208 bcf leftbind 3113 bcf leftbind
3214 STRCPY_TEXT_PRINT tApnoeTotal 3119 STRCPY_TEXT_PRINT tApnoeTotal
3215 call TFT_standard_color 3120 call TFT_standard_color
3216 movff divemins,lo 3121 movff divemins,lo
3217 clrf hi 3122 clrf hi
3218 WIN_MEDIUM apnoe_total_divetime_column, apnoe_total_divetime_row 3123 WIN_MEDIUM apnoe_total_divetime_column, apnoe_total_divetime_row
3219 lfsr FSR2,buffer
3220 output_16_3 ; displays only last three figures from a 16Bit value (0-999) 3124 output_16_3 ; displays only last three figures from a 16Bit value (0-999)
3221 call TFT_standard_color 3125 call TFT_standard_color
3222 STRCAT_PRINT "" ; Show minutes in large font 3126 STRCAT_PRINT "" ; Show minutes in large font
3223 WIN_SMALL apnoe_total_divetime_secs_column, apnoe_total_divetime_secs_row ; left position for two sec figures 3127 WIN_SMALL apnoe_total_divetime_secs_column, apnoe_total_divetime_secs_row ; left position for two sec figures
3224 lfsr FSR2,buffer
3225 PUTC ':' 3128 PUTC ':'
3226 bsf leftbind 3129 bsf leftbind
3227 movff divesecs,lo 3130 movff divesecs,lo
3228 output_99x 3131 output_99x
3229 bcf leftbind 3132 bcf leftbind
3565 call TFT_disabled_color 3468 call TFT_disabled_color
3566 btfss use_agf 3469 btfss use_agf
3567 call TFT_standard_color 3470 call TFT_standard_color
3568 3471
3569 WIN_STD dive_gf_column,dive_gf_row 3472 WIN_STD dive_gf_column,dive_gf_row
3570 lfsr FSR2,buffer
3571 bsf leftbind 3473 bsf leftbind
3572 movff opt_GF_low,lo 3474 movff opt_GF_low,lo
3573 output_8 3475 output_8
3574 PUTC "/" 3476 PUTC "/"
3575 movff opt_GF_high,lo 3477 movff opt_GF_high,lo
3582 3484
3583 btfss use_agf 3485 btfss use_agf
3584 call TFT_disabled_color 3486 call TFT_disabled_color
3585 3487
3586 WIN_STD dive_agf_column,dive_agf_row 3488 WIN_STD dive_agf_column,dive_agf_row
3587 lfsr FSR2,buffer
3588 movff opt_aGF_low,lo 3489 movff opt_aGF_low,lo
3589 output_8 3490 output_8
3590 PUTC "/" 3491 PUTC "/"
3591 movff opt_aGF_high,lo 3492 movff opt_aGF_high,lo
3592 output_8 3493 output_8
3607 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model) 3508 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model)
3608 movff char_I_deco_model,hi 3509 movff char_I_deco_model,hi
3609 decfsz hi,F ; jump over next line if char_I_deco_model == 1 3510 decfsz hi,F ; jump over next line if char_I_deco_model == 1
3610 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model) 3511 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model)
3611 WIN_STD dive_currentgf_column,dive_currentgf_row 3512 WIN_STD dive_currentgf_column,dive_currentgf_row
3612 lfsr FSR2,buffer
3613 output_8 3513 output_8
3614 STRCAT_PRINT "%" 3514 STRCAT_PRINT "%"
3615 return 3515 return
3616 3516
3617 global TFT_ead_end_tissues_clock_mask ; Setup Mask 3517 global TFT_ead_end_tissues_clock_mask ; Setup Mask
3632 TFT_ead_end_tissues_clock: 3532 TFT_ead_end_tissues_clock:
3633 ; Update clock and date 3533 ; Update clock and date
3634 WIN_SMALL dive_clock_column,dive_clock_row 3534 WIN_SMALL dive_clock_column,dive_clock_row
3635 call TFT_clock2 ; print clock 3535 call TFT_clock2 ; print clock
3636 ; WIN_SMALL dive_endtime_column,dive_endtime_row 3536 ; WIN_SMALL dive_endtime_column,dive_endtime_row
3637 ; lfsr FSR2,buffer
3638 ; 3537 ;
3639 ; btfss decostop_active ; Already in nodeco mode ? 3538 ; btfss decostop_active ; Already in nodeco mode ?
3640 ; bra TFT_ead_end_tissues_clock2 ; No, overwrite with some spaces 3539 ; bra TFT_ead_end_tissues_clock2 ; No, overwrite with some spaces
3641 ; 3540 ;
3642 ; STRCPY 0x94 ; "End of dive" icon 3541 ; STRCPY 0x94 ; "End of dive" icon