mirror of https://github.com/ArduPilot/ardupilot
Tools: add synthetic current sensor,fix SITL current
This commit is contained in:
parent
cff3066591
commit
ef65274b9c
|
@ -11881,7 +11881,7 @@ switch value'''
|
|||
raise NotAchievedException("Did not get BATTERY_STATUS message")
|
||||
battery_status_current_a = batt.current_battery * 0.01 # cA -> A
|
||||
self.progress("BATTERY_STATUS current==%f frsky==%f" % (battery_status_current_a, current_a))
|
||||
if self.compare_number_percent(battery_status_current_a, current_a, 10):
|
||||
if self.compare_number_percent(round(battery_status_current_a * 10), round(current_a * 10), 10):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ BUILD_OPTIONS = [
|
|||
Feature('Battery', 'BATTMON_FUELLEVEL_ANALOG', 'AP_BATTMON_FUELLEVEL_ANALOG_ENABLE', 'Enable Flow Level Analog BattryMonitor', 0, None), # noqa: E501
|
||||
Feature('Battery', 'BATTMON_SMBUS', 'AP_BATTMON_SMBUS_ENABLE', 'Enable SMBUS BatteryMonitor', 0, None),
|
||||
Feature('Battery', 'BATTMON_INA2XX', 'HAL_BATTMON_INA2XX_ENABLED', 'Enable INA2XX BatteryMonitor', 0, None),
|
||||
Feature('Battery', 'BATTMON_SYNTHETIC_CURRENT', 'AP_BATTMON_SYNTHETIC_CURRENT_ENABLED', 'Enable Synthetic Current Monitor', 0, None), # noqa: E501
|
||||
|
||||
Feature('Ident', 'ADSB', 'HAL_ADSB_ENABLED', 'Enable ADSB', 0, None),
|
||||
Feature('Ident', 'ADSB_SAGETECH', 'HAL_ADSB_SAGETECH_ENABLED', 'Enable SageTech ADSB', 0, 'ADSB'),
|
||||
|
|
Loading…
Reference in New Issue