Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 627:8d2dc109ecfc
NEW: Gaslist highlights "better gas" in divemode
author | heinrichsweikamp |
---|---|
date | Sat, 11 Aug 2012 16:55:14 +0200 |
parents | 7e2c324aa333 |
children | 47ad50ca5d26 |
comparison
equal
deleted
inserted
replaced
626:bab5a9fc1b10 | 627:8d2dc109ecfc |
---|---|
2905 addwf wait_temp,F ; Increase eeprom address for gas list | 2905 addwf wait_temp,F ; Increase eeprom address for gas list |
2906 movlw d'25' | 2906 movlw d'25' |
2907 addwf waitms_temp,F ; Increase row | 2907 addwf waitms_temp,F ; Increase row |
2908 WIN_LEFT .100 | 2908 WIN_LEFT .100 |
2909 movff waitms_temp,win_top ; Set Row | 2909 movff waitms_temp,win_top ; Set Row |
2910 | |
2911 STRCPY TXT_GAS1 | 2910 STRCPY TXT_GAS1 |
2912 movff hi,lo ; copy gas number | 2911 movff hi,lo ; copy gas number |
2913 output_8 ; display gas number | 2912 output_8 ; display gas number |
2914 PUTC ':' | 2913 PUTC ':' |
2915 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 2914 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
2923 output_8 ; outputs into Postinc2! | 2922 output_8 ; outputs into Postinc2! |
2924 | 2923 |
2925 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM | 2924 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM |
2926 call read_eeprom ; get byte (stored in EEDATA) | 2925 call read_eeprom ; get byte (stored in EEDATA) |
2927 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") | 2926 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") |
2927 | |
2928 ; Check if the "better gas" should be highlighted | |
2929 | |
2930 WIN_INVERT .0 ; Init new Wordprocessor | |
2931 movf better_gas_number,W ; better gas 1-5? | |
2932 cpfseq hi ; compare with gas# | |
2933 bra PLED_gas_list_loop2 ; No equal, skip | |
2934 | |
2935 movlw color_yellow ; Blink in yellow | |
2936 call PLED_set_color | |
2937 WIN_INVERT .1 ; Init new Wordprocessor | |
2938 | |
2939 PLED_gas_list_loop2: | |
2928 ; Check if gas needs to be greyed-out (inactive) | 2940 ; Check if gas needs to be greyed-out (inactive) |
2929 movff gaslist_active, EEDATA ; Work with sorted list | 2941 movff gaslist_active, EEDATA ; Work with sorted list |
2930 ; read_int_eeprom d'27' ; read flag register | |
2931 movff hi,lo ; copy gas number | 2942 movff hi,lo ; copy gas number |
2932 PLED_gas_list_loop1: | 2943 PLED_gas_list_loop1: |
2933 rrcf EEDATA ; roll flags into carry | 2944 rrcf EEDATA ; roll flags into carry |
2934 decfsz lo,F ; max. 5 times... | 2945 decfsz lo,F ; max. 5 times... |
2935 bra PLED_gas_list_loop1 | 2946 bra PLED_gas_list_loop1 |