Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 445:6e57b5bb98ce
localisation part 1 from Sergei
author | heinrichsweikamp |
---|---|
date | Thu, 11 Aug 2011 20:01:55 +0200 |
parents | ec28f64bfeff |
children | f6f818edf333 |
comparison
equal
deleted
inserted
replaced
444:f6cdd0079c36 | 445:6e57b5bb98ce |
---|---|
390 incf last_temperature+1,F ; Yes, make last_temperature+1>1 to make "display_profile2e" working | 390 incf last_temperature+1,F ; Yes, make last_temperature+1>1 to make "display_profile2e" working |
391 | 391 |
392 display_profile_offset4: | 392 display_profile_offset4: |
393 bsf leftbind | 393 bsf leftbind |
394 output_16dp d'3' ; max. depth | 394 output_16dp d'3' ; max. depth |
395 STRCAT "m " | 395 STRCAT TXT_METER2 |
396 call I2CREAD2 ; divetime in minutes | 396 call I2CREAD2 ; divetime in minutes |
397 movff SSPBUF,lo | 397 movff SSPBUF,lo |
398 call I2CREAD2 | 398 call I2CREAD2 |
399 movff SSPBUF,hi ; divetime in minutes | 399 movff SSPBUF,hi ; divetime in minutes |
400 | 400 |
503 call I2CREAD2 ; read Air pressure | 503 call I2CREAD2 ; read Air pressure |
504 movff SSPBUF,hi | 504 movff SSPBUF,hi |
505 | 505 |
506 bsf leftbind | 506 bsf leftbind |
507 output_16 ; Air pressure before dive | 507 output_16 ; Air pressure before dive |
508 STRCAT "mbar " | 508 STRCAT TXT_MBAR5 |
509 OUTPUTTEXT .014 ; Desat | 509 OUTPUTTEXT .014 ; Desat |
510 PUTC ' ' | 510 PUTC ' ' |
511 | 511 |
512 call I2CREAD2 ; read Desaturation time | 512 call I2CREAD2 ; read Desaturation time |
513 movff SSPBUF,lo | 513 movff SSPBUF,lo |
818 movlw color_white ; Color for Gas 1 | 818 movlw color_white ; Color for Gas 1 |
819 call PLED_set_color ; Set Color... | 819 call PLED_set_color ; Set Color... |
820 bsf leftbind | 820 bsf leftbind |
821 WIN_TOP .0 | 821 WIN_TOP .0 |
822 WIN_LEFT .0 | 822 WIN_LEFT .0 |
823 STRCPY "G1:" | 823 STRCPY TXT_G1_3 |
824 call I2CREAD2 ; Gas1 current O2 | 824 call I2CREAD2 ; Gas1 current O2 |
825 movff SSPBUF,lo | 825 movff SSPBUF,lo |
826 output_99x | 826 output_99x |
827 PUTC '/' | 827 PUTC '/' |
828 call I2CREAD2 ; Gas1 current HE | 828 call I2CREAD2 ; Gas1 current HE |
831 call word_processor ; Display Gas information | 831 call word_processor ; Display Gas information |
832 | 832 |
833 movlw color_green ; Color for Gas 2 | 833 movlw color_green ; Color for Gas 2 |
834 call PLED_set_color ; Set Color... | 834 call PLED_set_color ; Set Color... |
835 WIN_TOP .25 | 835 WIN_TOP .25 |
836 STRCPY "G2:" | 836 STRCPY TXT_G2_3 |
837 call I2CREAD2 ; Gas2 current O2 | 837 call I2CREAD2 ; Gas2 current O2 |
838 movff SSPBUF,lo | 838 movff SSPBUF,lo |
839 output_8 | 839 output_8 |
840 PUTC '/' | 840 PUTC '/' |
841 call I2CREAD2 ; Gas2 current HE | 841 call I2CREAD2 ; Gas2 current HE |
844 call word_processor ; Display Gas information | 844 call word_processor ; Display Gas information |
845 | 845 |
846 movlw color_red ; Color for Gas 3 | 846 movlw color_red ; Color for Gas 3 |
847 call PLED_set_color ; Set Color... | 847 call PLED_set_color ; Set Color... |
848 WIN_TOP .50 | 848 WIN_TOP .50 |
849 STRCPY "G3:" | 849 STRCPY TXT_G3_3 |
850 call I2CREAD2 ; Gas3 current O2 | 850 call I2CREAD2 ; Gas3 current O2 |
851 movff SSPBUF,lo | 851 movff SSPBUF,lo |
852 output_8 | 852 output_8 |
853 PUTC '/' | 853 PUTC '/' |
854 call I2CREAD2 ; Gas3 current HE | 854 call I2CREAD2 ; Gas3 current HE |
858 | 858 |
859 movlw color_yellow ; Color for Gas 4 | 859 movlw color_yellow ; Color for Gas 4 |
860 call PLED_set_color ; Set Color... | 860 call PLED_set_color ; Set Color... |
861 WIN_TOP .0 | 861 WIN_TOP .0 |
862 WIN_LEFT .60 | 862 WIN_LEFT .60 |
863 STRCPY "G4:" | 863 STRCPY TXT_G4_3 |
864 call I2CREAD2 ; Gas4 current O2 | 864 call I2CREAD2 ; Gas4 current O2 |
865 movff SSPBUF,lo | 865 movff SSPBUF,lo |
866 output_8 | 866 output_8 |
867 PUTC '/' | 867 PUTC '/' |
868 call I2CREAD2 ; Gas4 current HE | 868 call I2CREAD2 ; Gas4 current HE |
871 call word_processor ; Display Gas information | 871 call word_processor ; Display Gas information |
872 | 872 |
873 movlw color_violet ; Color for Gas 5 | 873 movlw color_violet ; Color for Gas 5 |
874 call PLED_set_color ; Set Color... | 874 call PLED_set_color ; Set Color... |
875 WIN_TOP .25 | 875 WIN_TOP .25 |
876 STRCPY "G5:" | 876 STRCPY TXT_G5_3 |
877 call I2CREAD2 ; Gas5 current O2 | 877 call I2CREAD2 ; Gas5 current O2 |
878 movff SSPBUF,lo | 878 movff SSPBUF,lo |
879 output_8 | 879 output_8 |
880 PUTC '/' | 880 PUTC '/' |
881 call I2CREAD2 ; Gas5 current HE | 881 call I2CREAD2 ; Gas5 current HE |
884 call word_processor ; Display Gas information | 884 call word_processor ; Display Gas information |
885 | 885 |
886 movlw color_cyan ; Color for Gas 6 | 886 movlw color_cyan ; Color for Gas 6 |
887 call PLED_set_color ; Set Color... | 887 call PLED_set_color ; Set Color... |
888 WIN_TOP .50 | 888 WIN_TOP .50 |
889 STRCPY "G6:" | 889 STRCPY TXT_G6_3 |
890 call I2CREAD2 ; Gas6 current O2 | 890 call I2CREAD2 ; Gas6 current O2 |
891 movff SSPBUF,lo | 891 movff SSPBUF,lo |
892 output_8 | 892 output_8 |
893 PUTC '/' | 893 PUTC '/' |
894 call I2CREAD2 ; Gas6 current HE | 894 call I2CREAD2 ; Gas6 current HE |
897 call word_processor ; Display Gas information | 897 call word_processor ; Display Gas information |
898 | 898 |
899 call PLED_standard_color | 899 call PLED_standard_color |
900 WIN_TOP .0 | 900 WIN_TOP .0 |
901 WIN_LEFT .120 | 901 WIN_LEFT .120 |
902 STRCPY "1st:" | 902 STRCPY TXT_1ST4 |
903 call I2CREAD2 ; Start Gas | 903 call I2CREAD2 ; Start Gas |
904 movff SSPBUF,lo | 904 movff SSPBUF,lo |
905 output_8 | 905 output_8 |
906 call word_processor ; Display Gas information | 906 call word_processor ; Display Gas information |
907 | 907 |
936 movwf ignore_digits | 936 movwf ignore_digits |
937 bsf ignore_digit5 ; do not display mV | 937 bsf ignore_digit5 ; do not display mV |
938 bsf leftbind | 938 bsf leftbind |
939 output_16dp d'2' ; e.g. 3.45V | 939 output_16dp d'2' ; e.g. 3.45V |
940 bcf leftbind | 940 bcf leftbind |
941 STRCAT_PRINT "V" | 941 STRCAT_PRINT TXT_VOLT1 |
942 | 942 |
943 bcf leftbind ; Clear flag | 943 bcf leftbind ; Clear flag |
944 | 944 |
945 ; call I2CREAD2 ; Skip Sampling rate | 945 ; call I2CREAD2 ; Skip Sampling rate |
946 | 946 |
981 call I2CREAD2 ; read Salinity | 981 call I2CREAD2 ; read Salinity |
982 lfsr FSR2,letter | 982 lfsr FSR2,letter |
983 movff SSPBUF,lo | 983 movff SSPBUF,lo |
984 clrf hi | 984 clrf hi |
985 output_16dp d'3' | 985 output_16dp d'3' |
986 STRCAT_PRINT "kg/l" | 986 STRCAT_PRINT TXT_KGL4 |
987 | 987 |
988 call I2CREAD2 ; Read CNS% | 988 call I2CREAD2 ; Read CNS% |
989 | 989 |
990 btfss show_cns_in_logbook ; Show CNS? | 990 btfss show_cns_in_logbook ; Show CNS? |
991 bra logbook_skip_cns ; No | 991 bra logbook_skip_cns ; No |
992 | 992 |
993 movff SSPBUF,lo | 993 movff SSPBUF,lo |
994 WIN_TOP .25 | 994 WIN_TOP .25 |
995 STRCPY "CNS:" | 995 STRCPY TXT_CNS4 |
996 output_8 | 996 output_8 |
997 STRCAT_PRINT "%" ; Display CNS % | 997 STRCAT_PRINT "%" ; Display CNS % |
998 | 998 |
999 logbook_skip_cns: | 999 logbook_skip_cns: |
1000 btfss logbook_format_0x21 | 1000 btfss logbook_format_0x21 |
1005 WIN_TOP .50 | 1005 WIN_TOP .50 |
1006 call I2CREAD2 ; Read average depth | 1006 call I2CREAD2 ; Read average depth |
1007 movff SSPBUF,lo | 1007 movff SSPBUF,lo |
1008 call I2CREAD2 ; Read average depth | 1008 call I2CREAD2 ; Read average depth |
1009 movff SSPBUF,hi | 1009 movff SSPBUF,hi |
1010 STRCPY "Avr:" | 1010 STRCPY TXT_AVR4 |
1011 output_16dp d'3' ; Average depth | 1011 output_16dp d'3' ; Average depth |
1012 STRCAT_PRINT "m" | 1012 STRCAT_PRINT TXT_METER1 |
1013 | 1013 |
1014 incf_eeprom_address d'4' ; Skip total dive time and GF factors | 1014 incf_eeprom_address d'4' ; Skip total dive time and GF factors |
1015 call I2CREAD ; Read deco modell | 1015 call I2CREAD ; Read deco modell |
1016 decf_eeprom_address d'2' ; back to GF factos | 1016 decf_eeprom_address d'2' ; back to GF factos |
1017 | 1017 |
1027 ; Show GF settings | 1027 ; Show GF settings |
1028 call I2CREAD2 ; Read GF_lo | 1028 call I2CREAD2 ; Read GF_lo |
1029 movff SSPBUF,lo | 1029 movff SSPBUF,lo |
1030 call I2CREAD2 ; Read GF_hi | 1030 call I2CREAD2 ; Read GF_hi |
1031 movff SSPBUF,hi | 1031 movff SSPBUF,hi |
1032 STRCPY "GF:" | 1032 STRCPY TXT_GF3 |
1033 output_8 ; GF_lo | 1033 output_8 ; GF_lo |
1034 PUTC '/' | 1034 PUTC '/' |
1035 movff hi,lo ; copy GF_hi | 1035 movff hi,lo ; copy GF_hi |
1036 output_8 ; GF_hi | 1036 output_8 ; GF_hi |
1037 call word_processor | 1037 call word_processor |
1040 logbook_show_sat: | 1040 logbook_show_sat: |
1041 call I2CREAD2 ; Read Saturation x | 1041 call I2CREAD2 ; Read Saturation x |
1042 movff SSPBUF,hi | 1042 movff SSPBUF,hi |
1043 call I2CREAD2 ; Read Desaturation x | 1043 call I2CREAD2 ; Read Desaturation x |
1044 movff SSPBUF,lo | 1044 movff SSPBUF,lo |
1045 STRCPY "Sat:" | 1045 STRCPY TXT_SAT4 |
1046 output_8 ; Sat x | 1046 output_8 ; Sat x |
1047 STRCAT "%/" | 1047 STRCAT "%/" |
1048 movff hi,lo ; copy Desat x | 1048 movff hi,lo ; copy Desat x |
1049 output_8 ; Desat x | 1049 output_8 ; Desat x |
1050 STRCAT_PRINT "%" | 1050 STRCAT_PRINT "%" |
1387 movff SSPBUF,hi | 1387 movff SSPBUF,hi |
1388 | 1388 |
1389 bsf leftbind | 1389 bsf leftbind |
1390 bsf ignore_digit5 ; Do not display 1cm figure | 1390 bsf ignore_digit5 ; Do not display 1cm figure |
1391 output_16dp d'3' ; max. depth | 1391 output_16dp d'3' ; max. depth |
1392 STRCAT "m " | 1392 STRCAT TXT_METER2 |
1393 call I2CREAD4 ; Block read | 1393 call I2CREAD4 ; Block read |
1394 movff SSPBUF,lo ; read divetime in minutes | 1394 movff SSPBUF,lo ; read divetime in minutes |
1395 call I2CREAD4 ; Block read | 1395 call I2CREAD4 ; Block read |
1396 movff SSPBUF,hi ; read divetime in minutes | 1396 movff SSPBUF,hi ; read divetime in minutes |
1397 bsf leftbind | 1397 bsf leftbind |