mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_HAL_ChibiOS: correct hwdef generator battery scale
This commit is contained in:
parent
d179103c67
commit
29c204c0bc
@ -335,7 +335,7 @@ define HAL_BATT_VOLT_SCALE 11.0
|
|||||||
f.write("%s BATT_CURRENT_SENS %s SCALE(1)\n" % (adc[1], name))
|
f.write("%s BATT_CURRENT_SENS %s SCALE(1)\n" % (adc[1], name))
|
||||||
f.write('''define HAL_BATT_CURR_PIN %s
|
f.write('''define HAL_BATT_CURR_PIN %s
|
||||||
define HAL_BATT_CURR_SCALE %.1f
|
define HAL_BATT_CURR_SCALE %.1f
|
||||||
''' % (get_ADC1_chan(mcu, adc[1]), int(settings['ibata_scale']) * 59.5 / 168 )) # scale taken from KakuteH7
|
''' % (get_ADC1_chan(mcu, adc[1]), 10000 / int(settings['ibata_scale'])))
|
||||||
elif (adc[3] == "ADC_RSSI"):
|
elif (adc[3] == "ADC_RSSI"):
|
||||||
f.write("%s RSSI_ADC %s\n" % (adc[1], name))
|
f.write("%s RSSI_ADC %s\n" % (adc[1], name))
|
||||||
f.write("define BOARD_RSSI_ANA_PIN %s\n" % (get_ADC1_chan(mcu, adc[1])))
|
f.write("define BOARD_RSSI_ANA_PIN %s\n" % (get_ADC1_chan(mcu, adc[1])))
|
||||||
|
Loading…
Reference in New Issue
Block a user