comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 826:2151c4135fad

CHANGE: Battery percent based on ON-Time instead of battery voltage
author heinrichsweikamp
date Wed, 30 Sep 2015 20:25:28 +0200
parents 95c08c0cfc29
children f8afe90796d6
comparison
equal deleted inserted replaced
825:588867b0d5c2 826:2151c4135fad
1913 bra set_dive_modes1 1913 bra set_dive_modes1
1914 1914
1915 set_powersafe: 1915 set_powersafe:
1916 btfsc low_battery_state ; battery warning alread active? 1916 btfsc low_battery_state ; battery warning alread active?
1917 bra set_powersafe2 ; Yes, but is it still required? 1917 bra set_powersafe2 ; Yes, but is it still required?
1918 ; battery voltage in mV (value*256+Lowbyte=actual treshold) 1918
1919 movlw d'12' ; 3,328V 1919 call update_batt_get_percent_in_lo
1920 cpfsgt batt_voltage+1 1920 movlw d'20' ; 20%
1921 cpfsgt lo
1921 bra set_powersafe1 1922 bra set_powersafe1
1922 return 1923 return
1923 1924
1924 set_powersafe1: 1925 set_powersafe1:
1925 movlw d'7' ; Type of alarm (Battery Low) 1926 movlw d'7' ; Type of alarm (Battery Low)