comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 626:bab5a9fc1b10

restore last used customview in dive- and surface-mode
author heinrichsweikamp
date Sat, 11 Aug 2012 15:30:30 +0200
parents 3f1a85ce7785
children 8d2dc109ecfc
comparison
equal deleted inserted replaced
625:7743cf997648 626:bab5a9fc1b10
34 ostc_debug 'R' ; Sends debug-information to screen if debugmode active 34 ostc_debug 'R' ; Sends debug-information to screen if debugmode active
35 call PLED_ClearScreen ; clean up OLED 35 call PLED_ClearScreen ; clean up OLED
36 call PLED_divemode_mask ; Display mask 36 call PLED_divemode_mask ; Display mask
37 call PLED_active_gas_divemode ; Display gas, if required 37 call PLED_active_gas_divemode ; Display gas, if required
38 call PLED_temp_divemode ; Displays temperature 38 call PLED_temp_divemode ; Displays temperature
39
40 ; Reload last customview
41 read_int_eeprom d'94' ; Read last selected customview dive mode into EEDATA
42 movff EEDATA,menupos3 ; Copy to menupos3
43 call customview_toggle2 ; Show customview
39 44
40 btfsc FLAG_apnoe_mode 45 btfsc FLAG_apnoe_mode
41 bsf realdive ; Set Realdive flag in Apnoe mode 46 bsf realdive ; Set Realdive flag in Apnoe mode
42 47
43 btfsc gauge_mode 48 btfsc gauge_mode
1497 movff temp1,EEDATA 1502 movff temp1,EEDATA
1498 write_int_eeprom d'2' ; write byte stored in EEDATA 1503 write_int_eeprom d'2' ; write byte stored in EEDATA
1499 movff temp2,EEDATA 1504 movff temp2,EEDATA
1500 write_int_eeprom d'3' ; write byte stored in EEDATA 1505 write_int_eeprom d'3' ; write byte stored in EEDATA
1501 1506
1507 ; Save dive mode custom view
1508 movff menupos3,EEDATA ; Copy to EEDATA
1509 write_int_eeprom d'94' ; Write last selected customview dive mode into EEPROM
1510
1502 GETCUSTOM15 .28 ; Logbook Offset -> lo, hi 1511 GETCUSTOM15 .28 ; Logbook Offset -> lo, hi
1503 tstfsz lo ; lo=0? 1512 tstfsz lo ; lo=0?
1504 bra change_logbook_offset1 ; No, adjust offset 1513 bra change_logbook_offset1 ; No, adjust offset
1505 tstfsz hi ; hi=0? 1514 tstfsz hi ; hi=0?
1506 bra change_logbook_offset1 ; No, adjust offset 1515 bra change_logbook_offset1 ; No, adjust offset
1888 movlw d'0' 1897 movlw d'0'
1889 cpfsgt EEDATA 1898 cpfsgt EEDATA
1890 call PLED_brightness_full 1899 call PLED_brightness_full
1891 1900
1892 bcf timeout_display 1901 bcf timeout_display
1893 clrf menupos3
1894 bcf menu3_active 1902 bcf menu3_active
1895 clrf divesecs 1903 clrf divesecs
1896 clrf samplesecs 1904 clrf samplesecs
1897 clrf apnoe_timeout_counter ; timeout in minutes 1905 clrf apnoe_timeout_counter ; timeout in minutes
1898 clrf timeout_counter ; takes care of the timeout (Low byte) 1906 clrf timeout_counter ; takes care of the timeout (Low byte)