Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/outputs.asm @ 791:a652b0ff4dcf
NEW: CF74: Battery Timeout [min] - Battery symbol will blink if the OSTC was
longer in active mode (since the last _full_ charge) then CF74
author | heinrichsweikamp |
---|---|
date | Thu, 28 Aug 2014 20:18:49 +0200 |
parents | b0c96aaa86e4 |
children | 7f3f79e53f66 |
comparison
equal
deleted
inserted
replaced
790:53425d598585 | 791:a652b0ff4dcf |
---|---|
2230 call DISP_warnings_color | 2230 call DISP_warnings_color |
2231 DISPLAYTEXT d'246' ; LowBatt! | 2231 DISPLAYTEXT d'246' ; LowBatt! |
2232 call DISP_standard_color | 2232 call DISP_standard_color |
2233 return | 2233 return |
2234 | 2234 |
2235 update_batt_voltage_clear: ; Clear every two seconds if on_time_seconds:3 > CF74*60 | |
2236 movff on_time_seconds+0,xC+0 | |
2237 movff on_time_seconds+1,xC+1 | |
2238 movff on_time_seconds+2,xC+2 | |
2239 clrf xC+4 | |
2240 movlw .60 | |
2241 movwf xB+0 | |
2242 clrf xB+1 | |
2243 call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder | |
2244 movff xC+0,sub_b+0 | |
2245 movff xC+1,sub_b+1 | |
2246 GETCUSTOM15 d'74' | |
2247 movff lo,sub_a+0 | |
2248 movff hi,sub_a+1 | |
2249 call sub16 ; sub_c = sub_a - sub_b | |
2250 btfss neg_flag | |
2251 bra update_batt_voltage0 ; Normal display | |
2252 WIN_BOX_BLACK .174, .194, .1, .34 ;top, bottom, left, right | |
2253 return | |
2254 | |
2235 update_batt_voltage: | 2255 update_batt_voltage: |
2236 ostc_debug 'f' | 2256 ostc_debug 'f' |
2237 | 2257 btfss secs,0 |
2258 bra update_batt_voltage_clear ; Clear every two seconds if on_time_seconds:3 > CF74*60 | |
2259 | |
2260 update_batt_voltage0: | |
2238 GETCUSTOM8 d'31' ; =1 if battery voltage should be visible | 2261 GETCUSTOM8 d'31' ; =1 if battery voltage should be visible |
2239 movwf lo | 2262 movwf lo |
2240 movlw d'1' | 2263 movlw d'1' |
2241 cpfseq lo ; =1? | 2264 cpfseq lo ; =1? |
2242 bra update_batt_voltage2 ; No, show symbol | 2265 bra update_batt_voltage2 ; No, show symbol |