comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 681:6e456a6398e0

Hardware4 support
author heinrichsweikamp
date Fri, 25 Jan 2013 18:00:49 +0100
parents cda5b45b953f
children 2129862bbfe6
comparison
equal deleted inserted replaced
680:c6220d340684 681:6e456a6398e0
47 47
48 menu_logbook: 48 menu_logbook:
49 bcf return_from_profileview ; clear some flags 49 bcf return_from_profileview ; clear some flags
50 menu_logbook1: 50 menu_logbook1:
51 bcf logbook_header_drawn 51 bcf logbook_header_drawn
52 call PLED_ClearScreen ; Clear screen 52 call DISP_ClearScreen ; Clear screen
53 bcf all_dives_shown ; clear some flags 53 bcf all_dives_shown ; clear some flags
54 bcf logbook_profile_view 54 bcf logbook_profile_view
55 bcf logbook_page_not_empty 55 bcf logbook_page_not_empty
56 clrf menupos3 ; Here: used rows on current logbook-page 56 clrf menupos3 ; Here: used rows on current logbook-page
57 clrf menupos2 ; Here: # of current displayed page 57 clrf menupos2 ; Here: # of current displayed page
198 198
199 menu_logbook_display_loop2: 199 menu_logbook_display_loop2:
200 btfss logbook_page_not_empty ; Was there one dive at all? 200 btfss logbook_page_not_empty ; Was there one dive at all?
201 bra menu_logbook ; Yes, so reload the first page 201 bra menu_logbook ; Yes, so reload the first page
202 202
203 call PLED_topline_box ; Draw box 203 call DISP_topline_box ; Draw box
204 WIN_INVERT .1 204 WIN_INVERT .1
205 DISPLAYTEXT .26 ; "Logbook" 205 DISPLAYTEXT .26 ; "Logbook"
206 WIN_INVERT .0 206 WIN_INVERT .0
207 207
208 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page 208 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page
214 movf mintemp+1,W ; load last cursor position again 214 movf mintemp+1,W ; load last cursor position again
215 movwf menupos ; and set menupos byte 215 movwf menupos ; and set menupos byte
216 bcf return_from_profileview ; Do this only once while the page is loaded again! 216 bcf return_from_profileview ; Do this only once while the page is loaded again!
217 217
218 bcf logbook_page_not_empty ; Obviously the current page is NOT empty 218 bcf logbook_page_not_empty ; Obviously the current page is NOT empty
219 call PLED_logbook_cursor 219 call DISP_logbook_cursor
220 220
221 menu_logbook_loop: 221 menu_logbook_loop:
222 call check_switches_logbook 222 call check_switches_logbook
223 223
224 btfsc menubit3 ; SET/MENU? 224 btfsc menubit3 ; SET/MENU?
252 mullw d'5' 252 mullw d'5'
253 movf PRODL,W 253 movf PRODL,W
254 addwf menupos,W ; page*5+menupos= 254 addwf menupos,W ; page*5+menupos=
255 movwf divesecs ; # of dive to search 255 movwf divesecs ; # of dive to search
256 256
257 call PLED_ClearScreen ; search for dive 257 call DISP_ClearScreen ; search for dive
258 bsf logbook_profile_view ; set flag for search routine 258 bsf logbook_profile_view ; set flag for search routine
259 259
260 clrf divenumber ; search from scratch 260 clrf divenumber ; search from scratch
261 261
262 movff logbook1_ptr+0,eeprom_address+0 262 movff logbook1_ptr+0,eeprom_address+0
268 bcf logbook_profile_view ; clear flag for search routine 268 bcf logbook_profile_view ; clear flag for search routine
269 269
270 clrf average_divesecs+0 270 clrf average_divesecs+0
271 clrf average_divesecs+1 ; holds amount of read samples 271 clrf average_divesecs+1 ; holds amount of read samples
272 272
273 call PLED_display_wait_clear 273 call DISP_display_wait_clear
274 call PLED_standard_color 274 call DISP_standard_color
275 WIN_TOP .0 275 WIN_TOP .0
276 WIN_LEFT .0 276 WIN_LEFT .0
277 STRCPY "#" 277 STRCPY "#"
278 278
279 GETCUSTOM15 .28 ; Logbook Offset -> lo, hi 279 GETCUSTOM15 .28 ; Logbook Offset -> lo, hi
325 movff lo,convert_value_temp+0 ; Month (in lo, see above) 325 movff lo,convert_value_temp+0 ; Month (in lo, see above)
326 call I2CREAD2 ; Day 326 call I2CREAD2 ; Day
327 movff SSPBUF,convert_value_temp+1 327 movff SSPBUF,convert_value_temp+1
328 call I2CREAD2 ; Year 328 call I2CREAD2 ; Year
329 movff SSPBUF,convert_value_temp+2 329 movff SSPBUF,convert_value_temp+2
330 call PLED_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 330 call DISP_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
331 331
332 PUTC ' ' 332 PUTC ' '
333 333
334 btfss logbook_format_0x21 ; Dive made with new 0x21 format? 334 btfss logbook_format_0x21 ; Dive made with new 0x21 format?
335 bra display_end_of_divetime 335 bra display_end_of_divetime
514 call I2CREAD2 514 call I2CREAD2
515 movff SSPBUF,hi ; Read min. Temperature 515 movff SSPBUF,hi ; Read min. Temperature
516 movff lo,logbook_min_tp+0 ; Backup min Tp° too. 516 movff lo,logbook_min_tp+0 ; Backup min Tp° too.
517 movff hi,logbook_min_tp+1 517 movff hi,logbook_min_tp+1
518 movlw color_orange ; Use same color as tp° curve 518 movlw color_orange ; Use same color as tp° curve
519 call PLED_set_color 519 call DISP_set_color
520 520
521 call PLED_convert_signed_temperature ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required 521 call DISP_convert_signed_temperature ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required
522 movlw d'3' 522 movlw d'3'
523 movwf ignore_digits 523 movwf ignore_digits
524 bsf leftbind 524 bsf leftbind
525 output_16dp d'2' ; temperature 525 output_16dp d'2' ; temperature
526 STRCAT_PRINT "°C" ; Display 2nd row of details 526 STRCAT_PRINT "°C" ; Display 2nd row of details
527 call PLED_standard_color ; Back to normal 527 call DISP_standard_color ; Back to normal
528 528
529 WIN_TOP .50 529 WIN_TOP .50
530 WIN_LEFT .05 530 WIN_LEFT .05
531 lfsr FSR2,letter 531 lfsr FSR2,letter
532 532
595 595
596 display_profile2d: 596 display_profile2d:
597 ; Start Profile display 597 ; Start Profile display
598 ; Write 0m X-Line.. 598 ; Write 0m X-Line..
599 movlw color_grey 599 movlw color_grey
600 call PLED_set_color ; Make this configurable? 600 call DISP_set_color ; Make this configurable?
601 601
602 movlw d'75' 602 movlw d'75'
603 movff WREG,win_top 603 movff WREG,win_top
604 movlw d'5' 604 movlw d'5'
605 movff WREG,win_leftx2 ; Left border (0-159) 605 movff WREG,win_leftx2 ; Left border (0-159)
606 movlw d'1' 606 movlw d'1'
607 movff WREG,win_height 607 movff WREG,win_height
608 movlw d'155' 608 movlw d'155'
609 movff WREG,win_width ; Right border (0-159) 609 movff WREG,win_width ; Right border (0-159)
610 display_profile2e: 610 display_profile2e:
611 call PLED_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2 611 call DISP_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2
612 movff win_top,WREG ; Get row 612 movff win_top,WREG ; Get row
613 addwf last_temperature+0,W ; Add line interval distance to win_top 613 addwf last_temperature+0,W ; Add line interval distance to win_top
614 tstfsz last_temperature+1 ; >255? 614 tstfsz last_temperature+1 ; >255?
615 movlw d'255' ; Yes, make win_top>239 -> Abort here 615 movlw d'255' ; Yes, make win_top>239 -> Abort here
616 btfsc STATUS,C ; A Cary from the addwf above? 616 btfsc STATUS,C ; A Cary from the addwf above?
621 cpfsgt lo ; >239? 621 cpfsgt lo ; >239?
622 bra display_profile2e ; No, draw another line 622 bra display_profile2e ; No, draw another line
623 623
624 ; Write 0min Y-Line.. 624 ; Write 0min Y-Line..
625 movlw color_grey 625 movlw color_grey
626 call PLED_set_color ; Make this configurable? 626 call DISP_set_color ; Make this configurable?
627 627
628 movlw d'75' 628 movlw d'75'
629 movff WREG,win_top 629 movff WREG,win_top
630 movlw d'4' 630 movlw d'4'
631 movff WREG,win_leftx2 ; Left border (0-159) 631 movff WREG,win_leftx2 ; Left border (0-159)
632 movlw d'164' 632 movlw d'164'
633 movff WREG,win_height 633 movff WREG,win_height
634 movlw d'1' 634 movlw d'1'
635 movff WREG,win_width ; "Window" Width 635 movff WREG,win_width ; "Window" Width
636 call PLED_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2 636 call DISP_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2
637 637
638 ; Draw frame around profile 638 ; Draw frame around profile
639 movlw color_blue 639 movlw color_blue
640 WIN_FRAME_COLOR .75, .239, .4, .159 ;top, bottom, left, right with color in WREG 640 WIN_FRAME_COLOR .75, .239, .4, .159 ;top, bottom, left, right with color in WREG
641 641
693 call subU16 ; set (or not) neg_flag 693 call subU16 ; set (or not) neg_flag
694 694
695 movlw color_dark_green ; Dark green if Ok, 695 movlw color_dark_green ; Dark green if Ok,
696 btfss neg_flag 696 btfss neg_flag
697 movlw color_dark_red ; Or dark red if ceiling overflown. 697 movlw color_dark_red ; Or dark red if ceiling overflown.
698 call PLED_set_color 698 call DISP_set_color
699 699
700 movff PRODL,xA+0 700 movff PRODL,xA+0
701 movff PRODH,xA+1 701 movff PRODH,xA+1
702 movff sim_pressure+0,xB+0 ; devide pressure in mbar/quant for row offsett 702 movff sim_pressure+0,xB+0 ; devide pressure in mbar/quant for row offsett
703 movff sim_pressure+1,xB+1 703 movff sim_pressure+1,xB+1
749 movwf xC+1 749 movwf xC+1
750 cpfsgt xC+0 750 cpfsgt xC+0
751 movff xC+1,xC+0 751 movff xC+1,xC+0
752 752
753 movlw color_orange 753 movlw color_orange
754 call PLED_set_color 754 call DISP_set_color
755 755
756 movf logbook_last_tp,W ; do we have a valid previous value ? 756 movf logbook_last_tp,W ; do we have a valid previous value ?
757 bz profile_display_temp_1 ; No: skip the vertical line. 757 bz profile_display_temp_1 ; No: skip the vertical line.
758 movwf xC+1 758 movwf xC+1
759 call profile_display_fill ; In this column between this row (xC+0) and the last row (xC+1) 759 call profile_display_fill ; In this column between this row (xC+0) and the last row (xC+1)
816 816
817 decfsz ignore_digits,F ; counts drawn x-pixels to zero 817 decfsz ignore_digits,F ; counts drawn x-pixels to zero
818 bra profile_display_loop ; Not ready yet 818 bra profile_display_loop ; Not ready yet
819 ; Done. 819 ; Done.
820 profile_display_loop_done: 820 profile_display_loop_done:
821 call PLED_standard_color ; Restore color 821 call DISP_standard_color ; Restore color
822 call menu_pre_loop_common ; Clear some menu flags, timeout and switches 822 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
823 823
824 display_profile_loop: 824 display_profile_loop:
825 call check_switches_logbook 825 call check_switches_logbook
826 btfsc menubit2 ; SET/MENU? 826 btfsc menubit2 ; SET/MENU?
849 movlw color_yellow ; Color for Gas 4 849 movlw color_yellow ; Color for Gas 4
850 dcfsnz active_gas,F 850 dcfsnz active_gas,F
851 movlw color_violet ; Color for Gas 5 851 movlw color_violet ; Color for Gas 5
852 dcfsnz active_gas,F 852 dcfsnz active_gas,F
853 movlw color_cyan ; Color for Gas 6 853 movlw color_cyan ; Color for Gas 6
854 goto PLED_set_color ; Set Color... 854 goto DISP_set_color ; Set Color...
855 855
856 ;============================================================================= 856 ;=============================================================================
857 profileview_page2: 857 profileview_page2:
858 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right 858 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right
859 859
860 movff average_depth_hold+0,eeprom_address+0 860 movff average_depth_hold+0,eeprom_address+0
861 movff average_depth_hold+1,eeprom_address+1 ; Pointer to Gaslist 861 movff average_depth_hold+1,eeprom_address+1 ; Pointer to Gaslist
862 862
863 movlw color_white ; Color for Gas 1 863 movlw color_white ; Color for Gas 1
864 call PLED_set_color ; Set Color... 864 call DISP_set_color ; Set Color...
865 bsf leftbind 865 bsf leftbind
866 WIN_TOP .0 866 WIN_TOP .0
867 WIN_LEFT .0 867 WIN_LEFT .0
868 STRCPY TXT_G1_3 868 STRCPY TXT_G1_3
869 call I2CREAD2 ; Gas1 current O2 869 call I2CREAD2 ; Gas1 current O2
874 movff SSPBUF,lo 874 movff SSPBUF,lo
875 output_8 875 output_8
876 call word_processor ; Display Gas information 876 call word_processor ; Display Gas information
877 877
878 movlw color_green ; Color for Gas 2 878 movlw color_green ; Color for Gas 2
879 call PLED_set_color ; Set Color... 879 call DISP_set_color ; Set Color...
880 WIN_TOP .25 880 WIN_TOP .25
881 STRCPY TXT_G2_3 881 STRCPY TXT_G2_3
882 call I2CREAD2 ; Gas2 current O2 882 call I2CREAD2 ; Gas2 current O2
883 movff SSPBUF,lo 883 movff SSPBUF,lo
884 output_8 884 output_8
887 movff SSPBUF,lo 887 movff SSPBUF,lo
888 output_8 888 output_8
889 call word_processor ; Display Gas information 889 call word_processor ; Display Gas information
890 890
891 movlw color_red ; Color for Gas 3 891 movlw color_red ; Color for Gas 3
892 call PLED_set_color ; Set Color... 892 call DISP_set_color ; Set Color...
893 WIN_TOP .50 893 WIN_TOP .50
894 STRCPY TXT_G3_3 894 STRCPY TXT_G3_3
895 call I2CREAD2 ; Gas3 current O2 895 call I2CREAD2 ; Gas3 current O2
896 movff SSPBUF,lo 896 movff SSPBUF,lo
897 output_8 897 output_8
900 movff SSPBUF,lo 900 movff SSPBUF,lo
901 output_8 901 output_8
902 call word_processor ; Display Gas information 902 call word_processor ; Display Gas information
903 903
904 movlw color_yellow ; Color for Gas 4 904 movlw color_yellow ; Color for Gas 4
905 call PLED_set_color ; Set Color... 905 call DISP_set_color ; Set Color...
906 WIN_TOP .0 906 WIN_TOP .0
907 WIN_LEFT .60 907 WIN_LEFT .60
908 STRCPY TXT_G4_3 908 STRCPY TXT_G4_3
909 call I2CREAD2 ; Gas4 current O2 909 call I2CREAD2 ; Gas4 current O2
910 movff SSPBUF,lo 910 movff SSPBUF,lo
914 movff SSPBUF,lo 914 movff SSPBUF,lo
915 output_8 915 output_8
916 call word_processor ; Display Gas information 916 call word_processor ; Display Gas information
917 917
918 movlw color_violet ; Color for Gas 5 918 movlw color_violet ; Color for Gas 5
919 call PLED_set_color ; Set Color... 919 call DISP_set_color ; Set Color...
920 WIN_TOP .25 920 WIN_TOP .25
921 STRCPY TXT_G5_3 921 STRCPY TXT_G5_3
922 call I2CREAD2 ; Gas5 current O2 922 call I2CREAD2 ; Gas5 current O2
923 movff SSPBUF,lo 923 movff SSPBUF,lo
924 output_8 924 output_8
927 movff SSPBUF,lo 927 movff SSPBUF,lo
928 output_8 928 output_8
929 call word_processor ; Display Gas information 929 call word_processor ; Display Gas information
930 930
931 movlw color_cyan ; Color for Gas 6 931 movlw color_cyan ; Color for Gas 6
932 call PLED_set_color ; Set Color... 932 call DISP_set_color ; Set Color...
933 WIN_TOP .50 933 WIN_TOP .50
934 STRCPY TXT_G6_3 934 STRCPY TXT_G6_3
935 call I2CREAD2 ; Gas6 current O2 935 call I2CREAD2 ; Gas6 current O2
936 movff SSPBUF,lo 936 movff SSPBUF,lo
937 output_8 937 output_8
939 call I2CREAD2 ; Gas6 current HE 939 call I2CREAD2 ; Gas6 current HE
940 movff SSPBUF,lo 940 movff SSPBUF,lo
941 output_8 941 output_8
942 call word_processor ; Display Gas information 942 call word_processor ; Display Gas information
943 943
944 call PLED_standard_color 944 call DISP_standard_color
945 WIN_TOP .0 945 WIN_TOP .0
946 WIN_LEFT .120 946 WIN_LEFT .120
947 STRCPY TXT_1ST4 947 STRCPY TXT_1ST4
948 call I2CREAD2 ; Start Gas 948 call I2CREAD2 ; Start Gas
949 movff SSPBUF,lo 949 movff SSPBUF,lo
1003 bra display_profile2_loop ; wait for something to do 1003 bra display_profile2_loop ; wait for something to do
1004 1004
1005 profileview_page3: 1005 profileview_page3:
1006 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right 1006 WIN_BOX_BLACK .0, .74, .0, .159 ;top, bottom, left, right
1007 1007
1008 call PLED_standard_color 1008 call DISP_standard_color
1009 1009
1010 movff average_depth_hold+0,eeprom_address+0 1010 movff average_depth_hold+0,eeprom_address+0
1011 movff average_depth_hold+1,eeprom_address+1 ; Pointer to Gaslist 1011 movff average_depth_hold+1,eeprom_address+1 ; Pointer to Gaslist
1012 1012
1013 incf_eeprom_address d'24' ; Point to "Salinity" 1013 incf_eeprom_address d'24' ; Point to "Salinity"
1190 ; draw a new 10min line here... 1190 ; draw a new 10min line here...
1191 clrf average_divesecs+0 1191 clrf average_divesecs+0
1192 clrf average_divesecs+1 ; clear counting registers for next line 1192 clrf average_divesecs+1 ; clear counting registers for next line
1193 1193
1194 movlw color_grey 1194 movlw color_grey
1195 call PLED_set_color ; Make this configurable? 1195 call DISP_set_color ; Make this configurable?
1196 movlw d'76' 1196 movlw d'76'
1197 movff WREG,win_top 1197 movff WREG,win_top
1198 incf timeout_counter3,W ; draw one line to right to make sure it's the background of the profile 1198 incf timeout_counter3,W ; draw one line to right to make sure it's the background of the profile
1199 movff WREG,win_leftx2 ; Left border (0-159) 1199 movff WREG,win_leftx2 ; Left border (0-159)
1200 movlw d'163' 1200 movlw d'163'
1201 movff WREG,win_height 1201 movff WREG,win_height
1202 movlw d'1' 1202 movlw d'1'
1203 movff WREG,win_width ; "Window" Width 1203 movff WREG,win_width ; "Window" Width
1204 call PLED_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2 1204 call DISP_box ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2
1205 1205
1206 profile_view_get_depth_no_line: 1206 profile_view_get_depth_no_line:
1207 call I2CREAD2 ; read first depth 1207 call I2CREAD2 ; read first depth
1208 movff SSPBUF,logbook_cur_depth+0 ; low value 1208 movff SSPBUF,logbook_cur_depth+0 ; low value
1209 call I2CREAD2 ; read first depth 1209 call I2CREAD2 ; read first depth
1313 decf divenumber,F 1313 decf divenumber,F
1314 bcf all_dives_shown 1314 bcf all_dives_shown
1315 clrf menupos3 ; here: used row on current page 1315 clrf menupos3 ; here: used row on current page
1316 movlw d'5' 1316 movlw d'5'
1317 movwf menupos ; here: active row on current page 1317 movwf menupos ; here: active row on current page
1318 call PLED_ClearScreen ; clear details/profile 1318 call DISP_ClearScreen ; clear details/profile
1319 goto menu_logbook1b ; start search 1319 goto menu_logbook1b ; start search
1320 1320
1321 next_logbook2: 1321 next_logbook2:
1322 btfsc all_dives_shown ; all shown 1322 btfsc all_dives_shown ; all shown
1323 goto menu_logbook1 ; all reset 1323 goto menu_logbook1 ; all reset
1324 1324
1325 clrf menupos3 1325 clrf menupos3
1326 movlw d'5' 1326 movlw d'5'
1327 movwf menupos ; 1327 movwf menupos ;
1328 incf menupos2,F ; start new screen 1328 incf menupos2,F ; start new screen
1329 call PLED_ClearScreen 1329 call DISP_ClearScreen
1330 1330
1331 next_logbook: 1331 next_logbook:
1332 movff eeprom_header_address+0,eeprom_address+0 1332 movff eeprom_header_address+0,eeprom_address+0
1333 movff eeprom_header_address+1,eeprom_address+1 ; continue search here 1333 movff eeprom_header_address+1,eeprom_address+1 ; continue search here
1334 goto menu_logbook1b 1334 goto menu_logbook1b
1358 movlw d'6' 1358 movlw d'6'
1359 movwf menupos ; Jump directly to exit if page is not full 1359 movwf menupos ; Jump directly to exit if page is not full
1360 1360
1361 next_logbook3b: 1361 next_logbook3b:
1362 clrf timeout_counter2 1362 clrf timeout_counter2
1363 call PLED_logbook_cursor 1363 call DISP_logbook_cursor
1364 1364
1365 bcf switch_right 1365 bcf switch_right
1366 bcf menubit3 ; clear flag 1366 bcf menubit3 ; clear flag
1367 goto menu_logbook_loop 1367 goto menu_logbook_loop
1368 1368
1370 bsf logbook_page_not_empty ; Page not empty 1370 bsf logbook_page_not_empty ; Page not empty
1371 incf menupos3,F 1371 incf menupos3,F
1372 1372
1373 btfsc logbook_header_drawn ; "Logbook already displayed? 1373 btfsc logbook_header_drawn ; "Logbook already displayed?
1374 bra display_listdive1a 1374 bra display_listdive1a
1375 call PLED_topline_box ; Draw box 1375 call DISP_topline_box ; Draw box
1376 WIN_INVERT .1 1376 WIN_INVERT .1
1377 DISPLAYTEXT .26 ; "Logbook" 1377 DISPLAYTEXT .26 ; "Logbook"
1378 WIN_INVERT .0 1378 WIN_INVERT .0
1379 bsf logbook_header_drawn 1379 bsf logbook_header_drawn
1380 1380
1413 movff lo,convert_value_temp+0 ; Month (in lo, see above) 1413 movff lo,convert_value_temp+0 ; Month (in lo, see above)
1414 call I2CREAD4 ; Day (Block read) 1414 call I2CREAD4 ; Day (Block read)
1415 movff SSPBUF,convert_value_temp+1 1415 movff SSPBUF,convert_value_temp+1
1416 call I2CREAD4 ; Year (Block read) 1416 call I2CREAD4 ; Year (Block read)
1417 movff SSPBUF,convert_value_temp+2 1417 movff SSPBUF,convert_value_temp+2
1418 call PLED_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in s 1418 call DISP_convert_date_short ; converts into "DD/MM" or "MM/DD" or "MM/DD" in s
1419 1419
1420 1420
1421 incf_eeprom_address d'2' ; Skip Bytes in EEPROM (faster) 1421 incf_eeprom_address d'2' ; Skip Bytes in EEPROM (faster)
1422 ; call I2CREAD2 ; hours (Skip) 1422 ; call I2CREAD2 ; hours (Skip)
1423 ; call I2CREAD2 ; minutes (skip) 1423 ; call I2CREAD2 ; minutes (skip)
1444 return ; No, Done. 1444 return ; No, Done.
1445 incf_eeprom_address d'10' ; Skip another 10 byte from the header for 0x21 format 1445 incf_eeprom_address d'10' ; Skip another 10 byte from the header for 0x21 format
1446 return 1446 return
1447 1447
1448 logbook_convert_64k: ; Converts <1.91 logbook (32kB) to 64kB variant 1448 logbook_convert_64k: ; Converts <1.91 logbook (32kB) to 64kB variant
1449 call PLED_boot 1449 call DISPLAY_boot
1450 call PLED_ClearScreen ; Clear screen 1450 call DISP_ClearScreen ; Clear screen
1451 movlw color_red 1451 movlw color_red
1452 call PLED_set_color ; Set to Red 1452 call DISP_set_color ; Set to Red
1453 DISPLAYTEXTH d'303' ; Please wait! 1453 DISPLAYTEXTH d'303' ; Please wait!
1454 clrf EEADR 1454 clrf EEADR
1455 movlw d'1' 1455 movlw d'1'
1456 movwf EEADRH 1456 movwf EEADRH
1457 movlw 0xAA 1457 movlw 0xAA