comparison code_part1/OSTC_code_asm_part1/menu_settime.asm @ 255:1efd59d689f8

small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
author heinrichsweikamp
date Sun, 10 Apr 2011 09:17:20 +0200
parents f5e9db793dd3
children ab2686087bce
comparison
equal deleted inserted replaced
254:8f20e8948b97 255:1efd59d689f8
48 48
49 call set_time_refresh 49 call set_time_refresh
50 50
51 DISPLAYTEXT .24 ; Set Hours 51 DISPLAYTEXT .24 ; Set Hours
52 52
53 bcf switch_right
53 bcf switch_left 54 bcf switch_left
54 bcf switch_right
55 55
56 settime_loop: 56 settime_loop:
57 btfsc switch_right
58 call add_hours_or_minutes_or_date
59
57 btfsc switch_left 60 btfsc switch_left
58 call add_hours_or_minutes_or_date
59
60 btfsc switch_right
61 call set_time_next_or_exit 61 call set_time_next_or_exit
62 62
63 btfsc menubit4 63 btfsc menubit4
64 bra set_time_done 64 bra set_time_done
65 65
135 bra set_time_done2 ; OK 135 bra set_time_done2 ; OK
136 movlw .1 ; not OK, set to 1st 136 movlw .1 ; not OK, set to 1st
137 movwf day 137 movwf day
138 138
139 set_time_done2: 139 set_time_done2:
140 WIN_LEFT .32 140 WIN_LEFT .0
141 WIN_TOP .155 141 WIN_TOP .215
142 movlw (.160-.32)/7 ; full line length, for various translations. 142 movlw (.160-.0)/7 ; full line length, for various translations.
143 movwf temp1 143 movwf temp1
144 call PLED_display_clear_common_y1 144 call PLED_display_clear_common_y1
145 145
146 movlw d'5' 146 movlw d'5'
147 movwf wait_temp 147 movwf wait_temp
191 dcfsnz menupos3,F 191 dcfsnz menupos3,F
192 bsf set_day 192 bsf set_day
193 dcfsnz menupos3,F 193 dcfsnz menupos3,F
194 bsf set_year 194 bsf set_year
195 195
196 WIN_LEFT .32 196 WIN_LEFT .0
197 WIN_TOP .155 197 WIN_TOP .215
198 call PLED_standard_color 198 call PLED_standard_color
199 lfsr FSR2,letter 199 lfsr FSR2,letter
200 OUTPUTTEXT .94 ; Set 200 OUTPUTTEXT .94 ; Set
201 201
202 movff menupos2,menupos3 202 movff menupos2,menupos3
221 call word_processor 221 call word_processor
222 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 222 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
223 return 223 return
224 224
225 add_hours_or_minutes_or_date: 225 add_hours_or_minutes_or_date:
226 bcf switch_right 226 bcf switch_left
227 clrf secs 227 clrf secs
228 228
229 btfsc set_year 229 btfsc set_year
230 bra add_year 230 bra add_year
231 231