Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/adc_rtc.asm @ 665:259e4c1bf3c2
grey-out TTS and ceiling after gas change (until new plan is ready)
author | heinrichsweikamp |
---|---|
date | Wed, 14 Nov 2012 12:39:39 +0100 |
parents | f87205426add |
children | 82f71a73f450 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Nov 14 12:02:14 2012 +0100 +++ b/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Nov 14 12:39:39 2012 +0100 @@ -91,9 +91,8 @@ get_battery_voltage4: ; check if the battery control memory needs to be initialised! - bcf initialize_battery1 ; clear check-flags - bcf initialize_battery2 - + bcf initialize_battery1 ; clear check-flag + read_int_eeprom d'40' ; get lowest battery voltage seen in mV movff EEDATA,sub_b+0 read_int_eeprom d'41' @@ -113,14 +112,11 @@ movwf sub_a+1 call sub16 ; sub_c = sub_a - sub_b btfss neg_flag ; neg_flag=1 if eeprom40:41 < 4500 - bsf initialize_battery2 ; battery need to be initialised + bsf initialize_battery1 ; battery need to be initialised btfss initialize_battery1 ; battery need to be initialised? bra get_battery_no_init ; No, we have already valid values, just check for new extremas - btfss initialize_battery2 ; battery need to be initialised? - bra get_battery_no_init ; No, we have already valid values, just check for new extremas - get_battery_voltage_reset: ; Init EEPROM for battery control ; Reset lowest battery seen