Mercurial > public > hwos_code
comparison src/start.asm @ 375:a9e35c1327aa
1.88 release, BUGFIX: Start with Sensor use from sleep (cR only), CHANGE: Apply button settings when button menu is closed, NEW: Reset button settings on a magnet reset (cR and OSTC 2)
author | heinrichsweikamp |
---|---|
date | Thu, 27 Aug 2015 17:05:13 +0200 |
parents | 2be48ccfa9de |
children | d3087a8ed7e1 |
comparison
equal
deleted
inserted
replaced
374:67c258bd34e3 | 375:a9e35c1327aa |
---|---|
137 | 137 |
138 btfsc RCON,POR ; Was this a power-on reset? | 138 btfsc RCON,POR ; Was this a power-on reset? |
139 goto use_old_batteries ; No, load last stored battery values | 139 goto use_old_batteries ; No, load last stored battery values |
140 | 140 |
141 call lt2942_get_status ; Check for gauge IC | 141 call lt2942_get_status ; Check for gauge IC |
142 btfsc rechargeable ; cR hardware? | 142 |
143 btfss rechargeable ; cR or 2 hardware? | |
144 goto new_battery_menu ; No, show "New battery dialog" | |
145 | |
146 movlw .30 | |
147 movff WREG,opt_cR_button_right | |
148 movff WREG,opt_cR_button_left ; Reset on power-on reset | |
149 call piezo_config ; Yes, configure buttons | |
143 goto use_old_batteries ; Yes, load last stored battery values | 150 goto use_old_batteries ; Yes, load last stored battery values |
144 | |
145 ; No, cR and we have a power-on reset | |
146 goto new_battery_menu ; show "New battery dialog" | |
147 | 151 |
148 global power_on_return | 152 global power_on_return |
149 power_on_return: | 153 power_on_return: |
150 bsf RCON,POR ; Set bit for next detection | 154 bsf RCON,POR ; Set bit for next detection |
151 | 155 |