Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 207:f5d909e03f52
charge indicator on surface screen
author | heinrichsweikamp |
---|---|
date | Sat, 06 Dec 2014 21:04:27 +0100 |
parents | 618191753d2b |
children | 3b5df65d53fc |
comparison
equal
deleted
inserted
replaced
206:031d875200ca | 207:f5d909e03f52 |
---|---|
2296 movlw 0x00 | 2296 movlw 0x00 |
2297 movff WREG,buffer+4 | 2297 movff WREG,buffer+4 |
2298 STRCAT_PRINT "" | 2298 STRCAT_PRINT "" |
2299 call TFT_divemask_color | 2299 call TFT_divemask_color |
2300 WIN_SMALL surf_press_column+4*8,surf_press_row | 2300 WIN_SMALL surf_press_column+4*8,surf_press_row |
2301 STRCPY_PRINT "mbar" | 2301 STRCPY_TEXT_PRINT tMBAR ; mbar |
2302 return | 2302 return |
2303 | 2303 |
2304 update_surf_press2: | 2304 update_surf_press2: |
2305 movff lo,sub_b+0 | 2305 movff lo,sub_b+0 |
2306 movff hi,sub_b+1 | 2306 movff hi,sub_b+1 |
2313 | 2313 |
2314 global TFT_update_batt_voltage | 2314 global TFT_update_batt_voltage |
2315 TFT_update_batt_voltage: | 2315 TFT_update_batt_voltage: |
2316 movff batt_percent,lo ; Get battery percent | 2316 movff batt_percent,lo ; Get battery percent |
2317 TFT_color_code warn_battery; Color-code battery percent | 2317 TFT_color_code warn_battery; Color-code battery percent |
2318 | |
2319 ; Setup charge indicator | |
2320 btfsc cc_active | |
2321 bsf win_invert | |
2322 btfsc cc_active | |
2323 movlw color_yellow | |
2324 btfsc cv_active | |
2325 movlw color_green | |
2326 btfsc cc_active | |
2327 call TFT_set_color | |
2328 | |
2318 WIN_TINY batt_percent_column,batt_percent_row | 2329 WIN_TINY batt_percent_column,batt_percent_row |
2319 bsf leftbind | 2330 bsf leftbind |
2320 output_8 | 2331 output_8 |
2321 bcf leftbind | 2332 bcf leftbind |
2322 STRCAT "% " | 2333 STRCAT "% " |
2323 movlw 0x00 | 2334 movlw 0x00 |
2324 movff WREG,buffer+4 ; Only "xxx%" | 2335 movff WREG,buffer+4 ; Only "xxx%" |
2325 STRCAT_PRINT "" | 2336 STRCAT_PRINT "" |
2337 bcf win_invert | |
2326 call TFT_standard_color | 2338 call TFT_standard_color |
2327 WIN_TINY batt_voltage_column,batt_voltage_row | 2339 WIN_TINY batt_voltage_column,batt_voltage_row |
2328 movff batt_voltage+0,lo | 2340 movff batt_voltage+0,lo |
2329 movff batt_voltage+1,hi | 2341 movff batt_voltage+1,hi |
2330 bsf leftbind | 2342 bsf leftbind |