Mercurial > public > hwos_code
comparison src/start.asm @ 113:f3062a611eef
Merge
author | heinrichsweikamp |
---|---|
date | Mon, 23 Jun 2014 16:14:33 +0200 |
parents | 5e1ef9bf32ec |
children | 939f1e83c4c2 |
comparison
equal
deleted
inserted
replaced
112:a24581f0b372 | 113:f3062a611eef |
---|---|
21 #include "rtc.inc" | 21 #include "rtc.inc" |
22 #include "external_flash.inc" | 22 #include "external_flash.inc" |
23 #include "convert.inc" | 23 #include "convert.inc" |
24 #include "strings.inc" | 24 #include "strings.inc" |
25 #include "tft_outputs.inc" | 25 #include "tft_outputs.inc" |
26 #include "adc_lightsensor.inc" | |
27 #include "i2c.inc" | |
26 | 28 |
27 extern init_ostc3 | 29 extern init_ostc3 |
28 extern option_restore_all | 30 extern option_restore_all |
29 | 31 |
30 ;============================================================================= | 32 ;============================================================================= |
57 ; Air pressure compensation after reset | 59 ; Air pressure compensation after reset |
58 call get_calibration_data ; Get calibration data from pressure sensor | 60 call get_calibration_data ; Get calibration data from pressure sensor |
59 banksel common ; get_calibration_data uses isr_backup | 61 banksel common ; get_calibration_data uses isr_backup |
60 bcf no_sensor_int ; normal sensor interrupt mode | 62 bcf no_sensor_int ; normal sensor interrupt mode |
61 | 63 |
64 call piezo_config | |
62 call TFT_DisplayOff ; display off | 65 call TFT_DisplayOff ; display off |
63 bsf LEDr ; Status LED | 66 bsf LEDr ; Status LED |
64 bcf pressure_refresh | 67 bcf pressure_refresh |
65 ; First pass will not have valid temperature! | 68 ; First pass will not have valid temperature! |
66 btfss pressure_refresh ; Air pressure compensation | 69 btfss pressure_refresh ; Air pressure compensation |
235 clrf flag5 | 238 clrf flag5 |
236 clrf flag6 | 239 clrf flag6 |
237 clrf flag7 | 240 clrf flag7 |
238 clrf flag8 | 241 clrf flag8 |
239 clrf flag9 | 242 clrf flag9 |
243 clrf flag10 | |
240 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! | 244 bsf tft_is_dimming ; TFT is dimming up (soon), ignore ambient sensor! |
245 | |
246 call lt2942_get_status ; Check for gauge IC | |
247 btfsc c3_hardware ; C3 hardware? | |
248 call lt2942_init ; Yes, init battery gauge IC | |
241 | 249 |
242 ; Select high altitude (Fly) mode? | 250 ; Select high altitude (Fly) mode? |
243 movff last_surfpressure_30min+0,sub_b+0 | 251 movff last_surfpressure_30min+0,sub_b+0 |
244 movff last_surfpressure_30min+1,sub_b+1 | 252 movff last_surfpressure_30min+1,sub_b+1 |
245 movlw HIGH high_altitude_threshold | 253 movlw HIGH high_altitude_threshold |