Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 209:cdba979821ee
frame around logbook scale, some more speed improvements
new WIN_FRAME_COLOR macro
author | heinrichsweikamp |
---|---|
date | Sun, 20 Feb 2011 10:59:03 +0100 |
parents | 3b961f17aa3a |
children | 38cccd304970 |
comparison
equal
deleted
inserted
replaced
208:3b961f17aa3a | 209:cdba979821ee |
---|---|
563 movff win_leftx2,lo ; Get win_leftx2 in Bank1... | 563 movff win_leftx2,lo ; Get win_leftx2 in Bank1... |
564 movlw d'159' ; Limit | 564 movlw d'159' ; Limit |
565 cpfsgt lo ; >159? | 565 cpfsgt lo ; >159? |
566 bra display_profile2f ; No, draw another line | 566 bra display_profile2f ; No, draw another line |
567 | 567 |
568 | 568 movlw color_blue |
569 WIN_FRAME_COLOR .75, .239, .4, .159 ;top, bottom, left, right with color in WREG | |
570 | |
569 call I2CREAD2 ; skip 0xFB (Header-end) | 571 call I2CREAD2 ; skip 0xFB (Header-end) |
570 clrf timeout_counter2 ; here: used as counter for depth readings | 572 clrf timeout_counter2 ; here: used as counter for depth readings |
571 call I2CREAD2 ; skip 0xFB (Header-end) | 573 call I2CREAD2 ; skip 0xFB (Header-end) |
572 movlw d'158' | 574 movlw d'158' |
573 movwf ignore_digits ; here: used as counter for x-pixels | 575 movwf ignore_digits ; here: used as counter for x-pixels |
823 | 825 |
824 lfsr FSR2,letter | 826 lfsr FSR2,letter |
825 movff divenumber,lo | 827 movff divenumber,lo |
826 output_99x ; # of dive | 828 output_99x ; # of dive |
827 PUTC ' ' | 829 PUTC ' ' |
828 call I2CREAD2 | 830 call I2CREAD2 ; logbook_profile_version (1st. byte of Header after the 0xFA, 0xFA) |
829 movff SSPBUF,lo | 831 movff SSPBUF,lo |
830 movlw d'13' | 832 movlw d'13' |
831 cpfsgt lo ; Skip if lo>13 | 833 cpfsgt lo ; Skip if lo>13 |
832 bra display_listdive2 ; use old format | 834 bra display_listdive2 ; use old format |
833 | 835 |
841 call I2CREAD2 ; Year | 843 call I2CREAD2 ; Year |
842 movff SSPBUF,convert_value_temp+2 | 844 movff SSPBUF,convert_value_temp+2 |
843 call PLED_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in s | 845 call PLED_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in s |
844 | 846 |
845 | 847 |
846 call I2CREAD2 ; hours (Skip) | 848 incf_eeprom_address d'2' ; Skip Bytes in EEPROM (faster) |
847 call I2CREAD2 ; minutes (skip) | 849 ; call I2CREAD2 ; hours (Skip) |
850 ; call I2CREAD2 ; minutes (skip) | |
851 | |
848 PUTC ' ' | 852 PUTC ' ' |
849 call I2CREAD2 ; Depth | 853 call I2CREAD2 ; Depth |
850 movff SSPBUF,lo | 854 movff SSPBUF,lo |
851 call I2CREAD2 | 855 call I2CREAD2 |
852 movff SSPBUF,hi | 856 movff SSPBUF,hi |
853 bsf leftbind | 857 bsf leftbind |
854 bsf ignore_digit5 ; Do not display 1cm figure | 858 bsf ignore_digit5 ; Do not display 1cm figure |
855 output_16dp d'3' ; max. depth | 859 output_16dp d'3' ; max. depth |
856 STRCAT "m " | 860 STRCAT "m " |
857 call I2CREAD2 | 861 call I2CREAD2 |
858 movff SSPBUF,lo | 862 movff SSPBUF,lo ; read divetime in minutes |
859 call I2CREAD2 | 863 call I2CREAD2 |
860 movff SSPBUF,hi | 864 movff SSPBUF,hi ; read divetime in minutes |
861 bsf leftbind | 865 bsf leftbind |
862 output_16 ; Divetime minutes | 866 output_16 ; Divetime minutes |
863 STRCAT_PRINT "'" ; Display header-row in list | 867 STRCAT_PRINT "'" ; Display header-row in list |
868 incf_eeprom_address d'37' ; 12 Bytes read from header, skip 37 Bytes in EEPROM (Remaining Header) | |
864 return | 869 return |