Mercurial > public > hwos_code
comparison src/logbook.asm @ 66:00636132cca6
BUGFIX: Maintain last selected customview in surface mode
author | heinrichsweikamp |
---|---|
date | Sat, 11 Jan 2014 18:03:04 +0100 |
parents | ec4d8503ec45 |
children | c34516c99ca8 |
comparison
equal
deleted
inserted
replaced
65:11af55b5ebbb | 66:00636132cca6 |
---|---|
26 #include "start.inc" | 26 #include "start.inc" |
27 #include "surfmode.inc" | 27 #include "surfmode.inc" |
28 #include "divemode.inc" | 28 #include "divemode.inc" |
29 #include "ghostwriter.inc" | 29 #include "ghostwriter.inc" |
30 | 30 |
31 extern do_main_menu,comm_mode | 31 extern do_main_menu2,comm_mode |
32 | 32 |
33 CBLOCK tmp+0x40 ; Keep space for menu processor. | 33 CBLOCK tmp+0x40 ; Keep space for menu processor. |
34 count_temperature ; Current sample count for temperature divisor | 34 count_temperature ; Current sample count for temperature divisor |
35 count_deco ; Current sample count for deco (ceiling) divisor | 35 count_deco ; Current sample count for deco (ceiling) divisor |
36 logbook_cur_depth:2 ; Current depth, for drawing profile. | 36 logbook_cur_depth:2 ; Current depth, for drawing profile. |
283 incf logbook_divenumber,F ; new header found, increase logbook_divenumber | 283 incf logbook_divenumber,F ; new header found, increase logbook_divenumber |
284 bra logbook4 ; Done with searching, display the header! | 284 bra logbook4 ; Done with searching, display the header! |
285 | 285 |
286 logbook3b: | 286 logbook3b: |
287 btfss logbook_page_not_empty ; Was there at least one dive? | 287 btfss logbook_page_not_empty ; Was there at least one dive? |
288 goto do_main_menu ; Not a single header was found, leave logbook. | 288 goto do_main_menu2 ; Not a single header was found, leave logbook. |
289 bra logbook_display_loop2 | 289 bra logbook_display_loop2 |
290 | 290 |
291 logbook_reset: | 291 logbook_reset: |
292 tstfsz logbook_divenumber ; Was there at least one dive? | 292 tstfsz logbook_divenumber ; Was there at least one dive? |
293 bra logbook_reset2 | 293 bra logbook_reset2 |
345 btfsc switch_right ; ENTER? | 345 btfsc switch_right ; ENTER? |
346 bra display_profile_or_exit ; view details/profile or exit logbook | 346 bra display_profile_or_exit ; view details/profile or exit logbook |
347 | 347 |
348 rcall log_screendump_and_onesecond ; Check if we need to make a screenshot and check for new second | 348 rcall log_screendump_and_onesecond ; Check if we need to make a screenshot and check for new second |
349 btfsc sleepmode ; Timeout? | 349 btfsc sleepmode ; Timeout? |
350 goto do_main_menu ; Yes | 350 goto do_main_menu2 ; Yes |
351 | 351 |
352 bra logbook_loop ; Wait for something to do | 352 bra logbook_loop ; Wait for something to do |
353 | 353 |
354 display_profile_or_exit: | 354 display_profile_or_exit: |
355 movlw logbook_row_number+.2 ; exit? | 355 movlw logbook_row_number+.2 ; exit? |
356 cpfseq menupos | 356 cpfseq menupos |
357 bra display_profile_or_exit2 ; No, check for "Next Page" | 357 bra display_profile_or_exit2 ; No, check for "Next Page" |
358 goto do_main_menu | 358 goto do_main_menu2 |
359 | 359 |
360 display_profile_or_exit2: | 360 display_profile_or_exit2: |
361 movlw logbook_row_number+.1 ; Next page? | 361 movlw logbook_row_number+.1 ; Next page? |
362 cpfseq menupos | 362 cpfseq menupos |
363 bra display_profile ; No, show details/profile | 363 bra display_profile ; No, show details/profile |