comparison src/logbook.asm @ 628:cd58f7fc86db

3.05 stable work
author heinrichsweikamp
date Thu, 19 Sep 2019 12:01:29 +0200
parents c40025d8e750
children 237931377539
comparison
equal deleted inserted replaced
627:bf5fee575701 628:cd58f7fc86db
1 ;============================================================================= 1 ;=============================================================================
2 ; 2 ;
3 ; File logbook.asm combined next generation V3.03.4 3 ; File logbook.asm combined next generation V3.03.5
4 ; 4 ;
5 ; Logbook 5 ; Logbook
6 ; 6 ;
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
8 ;============================================================================= 8 ;=============================================================================
99 #DEFINE log_show_gas_short logbook_flags,6 99 #DEFINE log_show_gas_short logbook_flags,6
100 ; logbook_flags,7 ; unused 100 ; logbook_flags,7 ; unused
101 101
102 ; Logbook Coordinates 102 ; Logbook Coordinates
103 #DEFINE logbook_list_left .10 ; column of dive# in list 103 #DEFINE logbook_list_left .10 ; column of dive# in list
104 #DEFINE logbook_row_offset .28 ; distance between rows of list (needs to be <= 32) 104 #DEFINE logbook_row_offset .27 ; distance between rows of list
105 #DEFINE logbook_row_number .6 ; amount of rows in the list 105 #DEFINE logbook_row_number .7 ; amount of rows in the list
106 106
107 ; Profile display 107 ; Profile display
108 #DEFINE profile_height_pixels .157 ; amount of pixels height for profile display 108 #DEFINE profile_height_pixels .157 ; amount of pixels height for profile display
109 #DEFINE profile_width_pixels .156 ; amount of pixels width for profile display 109 #DEFINE profile_width_pixels .156 ; amount of pixels width for profile display
110 #DEFINE profile_left .1 ; left border 110 #DEFINE profile_left .1 ; left border
234 logbook CODE 234 logbook CODE
235 235
236 ;============================================================================= 236 ;=============================================================================
237 237
238 TFT_logbook_cursor: 238 TFT_logbook_cursor:
239 WIN_BOX_BLACK .0, .240-.16, logbook_list_left-.8, logbook_list_left-.1 ; top, bottom, left, right 239 WIN_BOX_BLACK .0, .239, logbook_list_left-.8, logbook_list_left-.1 ; top, bottom, left, right
240 240
241 WIN_LEFT logbook_list_left-.8 ; set horizontal position 241 WIN_LEFT logbook_list_left-.8 ; set horizontal position
242 WIN_FONT FT_SMALL ; select small font 242 WIN_FONT FT_SMALL ; select small font
243 ; bcf win_invert ; reset invert flag 243 ; bcf win_invert ; reset invert flag
244 call TFT_standard_color ; print in white color 244 call TFT_standard_color ; print in white color
344 bra logbook ; YES - so reload the first page 344 bra logbook ; YES - so reload the first page
345 345
346 ; TFT_mask... 346 ; TFT_mask...
347 347
348 WIN_LEFT logbook_list_left 348 WIN_LEFT logbook_list_left
349 WIN_TOP logbook_row_offset*logbook_row_number 349 WIN_TOP logbook_row_offset*(logbook_row_number+.0)
350 STRCPY_TEXT_PRINT tNextLog ; "Next Page" 350 STRCPY_TEXT_PRINT tNextLog ; "Next Page"
351
351 WIN_LEFT logbook_list_left 352 WIN_LEFT logbook_list_left
352 WIN_TOP logbook_row_offset*(logbook_row_number+.1) 353 WIN_TOP logbook_row_offset*(logbook_row_number+.1)
353 STRCPY_TEXT_PRINT tExit ; "Exit" 354 STRCPY_TEXT_PRINT tExit ; "Exit"
354 355
355 movlw d'1' ; set cursor to position 1... 356 movlw d'1' ; set cursor to position 1...
358 movwf menu_pos_cur ; and set menu_pos_cur byte 359 movwf menu_pos_cur ; and set menu_pos_cur byte
359 bcf return_from_profileview ; do this only once while the page is loaded again 360 bcf return_from_profileview ; do this only once while the page is loaded again
360 361
361 bcf logbook_page_not_empty ; obviously the current page is NOT empty 362 bcf logbook_page_not_empty ; obviously the current page is NOT empty
362 363
363 movlw d'7' ; set cursor to position 7... 364 movlw d'8' ; set cursor to position 7...
364 btfsc keep_cursor_new_page ; ... if we came from the "new page" line 365 btfsc keep_cursor_new_page ; ... if we came from the "new page" line
365 movwf menu_pos_cur ; and set menu_pos_cur byte 366 movwf menu_pos_cur ; and set menu_pos_cur byte
366 bcf keep_cursor_new_page 367 bcf keep_cursor_new_page
367 368
368 call TFT_logbook_cursor ; show the cursor 369 call TFT_logbook_cursor ; show the cursor
1408 lfsr FSR2,buffer ; initialize output buffer 1409 lfsr FSR2,buffer ; initialize output buffer
1409 1410
1410 movf logbook_divenumber,W ; log_compute_divenumber needs the list number 1411 movf logbook_divenumber,W ; log_compute_divenumber needs the list number
1411 call log_compute_divenumber ; compute dive number 1412 call log_compute_divenumber ; compute dive number
1412 bsf leftbind 1413 bsf leftbind
1413 output_16_3 ; show dive number, but only last three digits 1414 movlw .3 ; start with 3rd digit (i.e. suppress the thousands)
1415 movwf ignore_digits
1416 output_16dp .0 ; show dive number
1414 bcf leftbind 1417 bcf leftbind
1415 PUTC ' ' 1418 PUTC ' '
1416 ; display_listdive2: 1419 ; display_listdive2:
1417 LOG_POINT_TO log_date+1 ; point to month 1420 LOG_POINT_TO log_date+1 ; point to month
1418 call ext_flash_byte_read_plus ; read month 1421 call ext_flash_byte_read_plus ; read month