Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 102:37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
author | heinrichsweikamp |
---|---|
date | Wed, 07 May 2014 14:57:58 +0200 |
parents | 87cc1adfe4da |
children | 223579e905c3 |
comparison
equal
deleted
inserted
replaced
101:8c471940d989 | 102:37275e0fa7f5 |
---|---|
891 WIN_TINY dive_custom_hud_column2,dive_custom_hud_row | 891 WIN_TINY dive_custom_hud_column2,dive_custom_hud_row |
892 STRCPY_TEXT_PRINT tDiveHudMask2 | 892 STRCPY_TEXT_PRINT tDiveHudMask2 |
893 WIN_TINY dive_custom_hud_column3,dive_custom_hud_row | 893 WIN_TINY dive_custom_hud_column3,dive_custom_hud_row |
894 STRCPY_TEXT_PRINT tDiveHudMask3 | 894 STRCPY_TEXT_PRINT tDiveHudMask3 |
895 call TFT_standard_color | 895 call TFT_standard_color |
896 return | |
897 | |
898 global TFT_hud_voltages | |
899 TFT_hud_voltages: ; Show HUD details | |
900 ; The mask | |
901 call TFT_divemask_color | |
902 WIN_TINY .5,dive_custom_hud_row | |
903 STRCPY_TEXT_PRINT tDiveHudMask1 | |
904 WIN_TINY .55,dive_custom_hud_row | |
905 STRCPY_TEXT_PRINT tDiveHudMask2 | |
906 WIN_TINY .105,dive_custom_hud_row | |
907 STRCPY_TEXT_PRINT tDiveHudMask3 | |
908 call TFT_standard_color | |
909 WIN_SMALL .5,dive_hud_data_row | |
910 movff o2_mv_sensor1+0,lo | |
911 movff o2_mv_sensor1+1,hi | |
912 lfsr FSR2,buffer | |
913 bsf leftbind | |
914 output_16dp .4 ; x.xx | |
915 bcf leftbind | |
916 STRCAT_PRINT "mV " | |
917 WIN_SMALL .55,dive_hud_data_row | |
918 movff o2_mv_sensor2+0,lo | |
919 movff o2_mv_sensor2+1,hi | |
920 lfsr FSR2,buffer | |
921 bsf leftbind | |
922 output_16dp .4 ; x.xx | |
923 bcf leftbind | |
924 STRCAT_PRINT "mV " | |
925 WIN_SMALL .105,dive_hud_data_row | |
926 movff o2_mv_sensor3+0,lo | |
927 movff o2_mv_sensor3+1,hi | |
928 lfsr FSR2,buffer | |
929 bsf leftbind | |
930 output_16dp .4 ; x.xx | |
931 bcf leftbind | |
932 STRCAT_PRINT "mV " | |
896 return | 933 return |
897 | 934 |
898 global TFT_update_hud ; Update HUD data | 935 global TFT_update_hud ; Update HUD data |
899 TFT_update_hud: | 936 TFT_update_hud: |
900 ; show three sensors | 937 ; show three sensors |
3473 global TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock | 3510 global TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock |
3474 TFT_ead_end_tissues_clock: | 3511 TFT_ead_end_tissues_clock: |
3475 ; Update clock and date | 3512 ; Update clock and date |
3476 WIN_SMALL dive_clock_column,dive_clock_row | 3513 WIN_SMALL dive_clock_column,dive_clock_row |
3477 call TFT_clock2 ; print clock | 3514 call TFT_clock2 ; print clock |
3478 ; WIN_SMALL dive_date_column,dive_date_row | 3515 WIN_SMALL dive_endtime_column,dive_endtime_row |
3479 ; lfsr FSR2,buffer | 3516 lfsr FSR2,buffer |
3480 ; movff month,convert_value_temp+0 | 3517 |
3481 ; movff day,convert_value_temp+1 | 3518 btfss decostop_active ; Already in nodeco mode ? |
3482 ; movff year,convert_value_temp+2 | 3519 bra TFT_ead_end_tissues_clock2 ; No, overwrite with some spaces |
3483 ; rcall TFT_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in postinc2 | 3520 |
3484 ; STRCAT_PRINT "." | 3521 STRCPY 0x94 ; "End of dive" icon |
3522 movff hours,WREG | |
3523 mullw .60 | |
3524 movf mins,W | |
3525 addwf PRODL | |
3526 movlw .0 | |
3527 addwfc PRODH | |
3528 movff PRODL, lo | |
3529 movff PRODH, hi | |
3530 | |
3531 ; Add TTS | |
3532 movff int_O_ascenttime+0,WREG ; TTS | |
3533 addwf lo,F | |
3534 movff int_O_ascenttime+1,WREG ; TTS is 16bits | |
3535 addwfc hi,F | |
3536 | |
3537 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) | |
3538 movf hi,W | |
3539 movff lo,hi | |
3540 movwf lo ; exchange lo and hi | |
3541 output_99x | |
3542 PUTC ':' | |
3543 movff hi,lo | |
3544 output_99x | |
3545 STRCAT_PRINT "" | |
3546 bra TFT_ead_end_tissues_clock3 | |
3547 | |
3548 TFT_ead_end_tissues_clock2: | |
3549 STRCPY_PRINT " " | |
3550 TFT_ead_end_tissues_clock3: | |
3485 | 3551 |
3486 ; Show END/EAD | 3552 ; Show END/EAD |
3487 WIN_SMALL dive_ead_column,dive_ead_row | 3553 WIN_SMALL dive_ead_column,dive_ead_row |
3488 STRCPY_TEXT tEAD ; EAD: | 3554 STRCPY_TEXT tEAD ; EAD: |
3489 movff char_O_EAD,lo | 3555 movff char_O_EAD,lo |