Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 374:6ee9c849ad92 64kByte Logbook
GF profile. GF and Decotype in Logbok
author | Heinrichsweikamp |
---|---|
date | Sun, 12 Jun 2011 08:52:41 +0200 |
parents | 8781d1cf96d8 |
children | 84a1762de6ab |
comparison
equal
deleted
inserted
replaced
373:8781d1cf96d8 | 374:6ee9c849ad92 |
---|---|
519 bcf divisor_deco,5 | 519 bcf divisor_deco,5 |
520 bcf divisor_deco,6 | 520 bcf divisor_deco,6 |
521 bcf divisor_deco,7 | 521 bcf divisor_deco,7 |
522 movff divisor_deco,logbook_temp2 ; Store as temp, too | 522 movff divisor_deco,logbook_temp2 ; Store as temp, too |
523 call I2CREAD2 ; Read divisor | 523 call I2CREAD2 ; Read divisor |
524 movff SSPBUF,divisor_tank ; Store divisor | 524 movff SSPBUF,divisor_gf ; Store divisor |
525 call I2CREAD2 ; Read divisor | 525 call I2CREAD2 ; Read divisor |
526 movff SSPBUF,divisor_ppo2 ; Store divisor | 526 movff SSPBUF,divisor_ppo2 ; Store divisor |
527 call I2CREAD2 ; Read divisor | 527 call I2CREAD2 ; Read divisor |
528 movff SSPBUF,divisor_deco_debug ; Store divisor | 528 movff SSPBUF,divisor_deco_debug ; Store divisor |
529 call I2CREAD2 ; Read divisor | 529 call I2CREAD2 ; Read divisor |
872 | 872 |
873 logbook_skip_cns: | 873 logbook_skip_cns: |
874 btfss logbook_format_0x21 | 874 btfss logbook_format_0x21 |
875 bra skip_new_format_0x21_info ; Do not show remaining info from dive | 875 bra skip_new_format_0x21_info ; Do not show remaining info from dive |
876 | 876 |
877 ; Show all new 0x21 data | |
878 ; Show average depth | |
877 WIN_TOP .50 | 879 WIN_TOP .50 |
878 call I2CREAD2 ; Read average depth | 880 call I2CREAD2 ; Read average depth |
879 movff SSPBUF,lo | 881 movff SSPBUF,lo |
880 call I2CREAD2 ; Read average depth | 882 call I2CREAD2 ; Read average depth |
881 movff SSPBUF,hi | 883 movff SSPBUF,hi |
882 STRCPY "Avr:" | 884 STRCPY "Avr:" |
883 output_16dp d'3' ; Average depth | 885 output_16dp d'3' ; Average depth |
884 STRCAT_PRINT "m" | 886 STRCAT_PRINT "m" |
885 | 887 |
886 ; WIN_TOP .0 | 888 ; Show GF settings |
887 ; WIN_LEFT .75 | 889 incf_eeprom_address d'2' ; Skip total dive time |
890 WIN_TOP .0 | |
891 WIN_LEFT .75 | |
892 call I2CREAD2 ; Read GF_lo | |
893 movff SSPBUF,hi | |
894 call I2CREAD2 ; Read GF_hi | |
895 movff SSPBUF,lo | |
896 STRCPY "GF:" | |
897 output_8 ; GF_hi | |
898 PUTC '/' | |
899 movff lo,hi ; copy GF_lo | |
900 output_8 ; GF_lo | |
901 call word_processor | |
902 | |
903 ; Show deco model | |
904 WIN_TOP .25 | |
905 call I2CREAD2 ; Read deco modell | |
906 movff SSPBUF,lo | |
907 lfsr FSR2,letter | |
908 incf lo,F ; +1 | |
909 dcfsnz lo,F ; ZH-L16 OC? | |
910 movlw d'101' ; Textnumber | |
911 dcfsnz lo,F ; Gauge? | |
912 movlw d'102' ; Textnumber | |
913 dcfsnz lo,F ; ZH-L16 CC? | |
914 movlw d'104' ; Textnumber | |
915 dcfsnz lo,F ; Apnoe? | |
916 movlw d'138' ; Textnumber | |
917 dcfsnz lo,F ; L16-GF OC? | |
918 movlw d'152' ; Textnumber | |
919 dcfsnz lo,F ; L16-GF CC? | |
920 movlw d'236' ; Textnumber | |
921 call displaytext0_low ; Outputs to POSTINC2 | |
922 call word_processor | |
888 | 923 |
889 skip_new_format_0x21_info: | 924 skip_new_format_0x21_info: |
890 bcf menubit2 | 925 bcf menubit2 |
891 bcf menubit3 | 926 bcf menubit3 |
892 bcf switch_right | 927 bcf switch_right |
1206 btfss logbook_format_0x21 ; 10byte extra? | 1241 btfss logbook_format_0x21 ; 10byte extra? |
1207 return ; No, Done. | 1242 return ; No, Done. |
1208 incf_eeprom_address d'10' ; Skip another 10 byte from the header for 0x21 format | 1243 incf_eeprom_address d'10' ; Skip another 10 byte from the header for 0x21 format |
1209 return | 1244 return |
1210 | 1245 |
1211 logbook_convert_64k: | 1246 logbook_convert_64k: ; Converts <1.91 logbook (32kB) to 64kB variant |
1212 call PLED_boot | 1247 call PLED_boot |
1213 call PLED_ClearScreen ; Clear screen | 1248 call PLED_ClearScreen ; Clear screen |
1214 movlw color_red | 1249 movlw color_red |
1215 call PLED_set_color ; Set to Red | 1250 call PLED_set_color ; Set to Red |
1216 DISPLAYTEXTH d'303' ; Please wait! | 1251 DISPLAYTEXTH d'303' ; Please wait! |