Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 519:154b1d1c489e
NEW added GF surface display.
author | JeanDo |
---|---|
date | Tue, 06 Dec 2011 18:02:18 +0100 |
parents | a73a452ca155 |
children | f9a03808dfe2 |
comparison
equal
deleted
inserted
replaced
518:52f3f3f39932 | 519:154b1d1c489e |
---|---|
1876 movff nofly_time+1,hi | 1876 movff nofly_time+1,hi |
1877 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) | 1877 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) |
1878 bsf leftbind | 1878 bsf leftbind |
1879 movf lo,W | 1879 movf lo,W |
1880 movff hi,lo | 1880 movff hi,lo |
1881 movwf hi ; exchange lo and hi... | 1881 movwf hi ; exchange lo and hi... |
1882 output_8 ; Hours | 1882 output_8 ; Hours |
1883 PUTC ':' | 1883 PUTC ':' |
1884 movff hi,lo ; Minutes | 1884 movff hi,lo ; Minutes |
1885 output_99x | 1885 output_99x |
1886 bcf leftbind | 1886 bcf leftbind |
1887 PUTC ' ' | 1887 PUTC ' ' |
2018 movlw d'3' | 2018 movlw d'3' |
2019 cpfsgt wait_temp | 2019 cpfsgt wait_temp |
2020 movwf wait_temp ; Minimum = 3 | 2020 movwf wait_temp ; Minimum = 3 |
2021 | 2021 |
2022 update_batt_voltage2a: | 2022 update_batt_voltage2a: |
2023 WIN_BOX_STD .181, .187, .32, .34 | 2023 WIN_BOX_STD .181, .187, .32, .34 ; Battery nose |
2024 | 2024 |
2025 update_batt_voltage3: | 2025 update_batt_voltage3: |
2026 GETCUSTOM8 d'34' ; Color battery | 2026 GETCUSTOM8 d'34' ; Color battery |
2027 btfsc cc_active | 2027 btfsc cc_active |
2028 movlw color_yellow ; CC active | 2028 movlw color_yellow ; CC active |
2029 btfsc charge_done | 2029 btfsc charge_done |
2030 movlw color_green ; Charge done. | 2030 movlw color_green ; Charge done. |
2031 call PLED_set_color | 2031 call PLED_set_color |
2032 | 2032 |
2033 movlw .175 | 2033 movlw .175 |
2034 movff WREG,win_top ; row top (0-239) | 2034 movff WREG,win_top ; row top (0-239) |
2035 movlw .19 | 2035 movlw .19 |
2036 movff WREG,win_height | 2036 movff WREG,win_height |
2037 movlw .2 | 2037 movlw .2 |
2038 movff WREG,win_leftx2 ; column left (0-159) | 2038 movff WREG,win_leftx2 ; column left (0-159) |
2039 movff wait_temp,win_width ; column right (0-159) | 2039 movff wait_temp,win_width ; column right (0-159) |
2040 call PLED_box | 2040 call PLED_box |
2041 call PLED_standard_color | 2041 call PLED_standard_color |
2042 return | 2042 return |
2043 | 2043 |
2044 update_batt_voltage2_empty: | 2044 update_batt_voltage2_empty: |
2045 movlw d'1' | 2045 movlw d'1' |
2046 movwf wait_temp | 2046 movwf wait_temp |
2047 bra update_batt_voltage2a | 2047 bra update_batt_voltage2a |
2048 | 2048 |
2263 return ; Yes, do not display surface mode timeout | 2263 return ; Yes, do not display surface mode timeout |
2264 | 2264 |
2265 call PLED_divemask_color ; Set Color for Divemode mask | 2265 call PLED_divemask_color ; Set Color for Divemode mask |
2266 DISPLAYTEXT d'140' ; "SURFACE" | 2266 DISPLAYTEXT d'140' ; "SURFACE" |
2267 call PLED_standard_color | 2267 call PLED_standard_color |
2268 | |
2269 | 2268 |
2270 WIN_TOP .85 | 2269 WIN_TOP .85 |
2271 WIN_LEFT .90 | 2270 WIN_LEFT .90 |
2272 WIN_FONT FT_MEDIUM | 2271 WIN_FONT FT_MEDIUM |
2273 call PLED_standard_color | 2272 call PLED_standard_color |
3590 output_8 | 3589 output_8 |
3591 bcf leftbind | 3590 bcf leftbind |
3592 STRCAT_PRINT "%" | 3591 STRCAT_PRINT "%" |
3593 return | 3592 return |
3594 | 3593 |
3594 ;----------------------------------------------------------------------------- | |
3595 ; | |
3595 PLED_display_cns_surface: | 3596 PLED_display_cns_surface: |
3596 ; Check if CNS should be displayed | 3597 ; Check if CNS should be displayed |
3597 movff char_O_CNS_fraction,lo ; copy into bank1 | 3598 movff char_O_CNS_fraction,lo ; copy into bank1 |
3598 GETCUSTOM8 d'15' ; cns_display_high_surfacemode | 3599 GETCUSTOM8 d'15' ; cns_display_high_surfacemode |
3599 subwf lo,W | 3600 subwf lo,W |
3612 STRCPY TXT_CNS4 | 3613 STRCPY TXT_CNS4 |
3613 movff char_O_CNS_fraction,lo | 3614 movff char_O_CNS_fraction,lo |
3614 bsf leftbind | 3615 bsf leftbind |
3615 output_8 | 3616 output_8 |
3616 bcf leftbind | 3617 bcf leftbind |
3617 STRCAT_PRINT "%" | 3618 STRCAT_PRINT "% " |
3618 return | 3619 return |
3619 | 3620 |
3621 ;----------------------------------------------------------------------------- | |
3622 ; Display GF at furface, if > CF8. | |
3623 ; | |
3624 PLED_display_gf_surface: | |
3625 movff char_O_gradient_factor,lo ; gradient factor | |
3626 GETCUSTOM8 d'8' ; threshold for display | |
3627 cpfslt lo ; show value? | |
3628 bra PLED_display_gf_surf_1 ; YES: do it. | |
3629 return | |
3630 | |
3631 PLED_display_gf_surf_1: | |
3632 WIN_TOP .175 | |
3633 WIN_LEFT .45 | |
3634 WIN_FONT FT_SMALL | |
3635 PLED_color_code warn_gf ; Color-code Output | |
3636 | |
3637 STRCPY TXT_GF3 | |
3638 movff char_O_gradient_factor,lo ; gradient factor | |
3639 output_8 | |
3640 STRCAT_PRINT "% " | |
3641 goto PLED_standard_color | |
3642 | |
3643 ;----------------------------------------------------------------------------- | |
3620 | 3644 |
3621 PLED_custom_text: | 3645 PLED_custom_text: |
3622 read_int_eeprom d'64' | 3646 read_int_eeprom d'64' |
3623 movlw d'1' | 3647 movlw d'1' |
3624 cpfseq EEDATA ; Custom text active? | 3648 cpfseq EEDATA ; Custom text active? |
3691 | 3715 |
3692 STRCPY TXT_GAS1 | 3716 STRCPY TXT_GAS1 |
3693 movff hi,lo ; copy gas number | 3717 movff hi,lo ; copy gas number |
3694 output_8 ; display gas number | 3718 output_8 ; display gas number |
3695 PUTC ':' | 3719 PUTC ':' |
3696 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 3720 movff wait_temp, EEADR ; Gas #hi: %O2 - Set address in internal EEPROM |
3697 call read_eeprom ; get byte (stored in EEDATA) | 3721 call read_eeprom ; get byte (stored in EEDATA) |
3698 movff EEDATA,lo ; copy to lo | 3722 movff EEDATA,lo ; copy to lo |
3699 output_8 ; outputs into Postinc2! | 3723 output_8 ; outputs into Postinc2! |
3700 PUTC '/' | 3724 PUTC '/' |
3701 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | 3725 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM |