Added Power Brick related battery_status.msg fields

system_source - This battery status is for the brick that is
                   supplying VDD_5V_IN
   priority      - Zero based, This battery status is for the brick
                   that is connected to the Power controller's
                   N-1 priority input. V1..VN. 0 would normally be
                   Brick1, 1 for Brick2 etc

  Battery now assigns connected from the api in the
  updateBatteryStatus, as well as system_source and priority
This commit is contained in:
David Sidrane
2017-06-29 10:45:52 -10:00
parent 579b55f2cb
commit 8e8510f398
7 changed files with 23 additions and 8 deletions

View File

@@ -331,7 +331,7 @@ void Simulator::handle_message(mavlink_message_t *msg, bool publish)
// TODO: don't hard-code throttle.
const float throttle = 0.5f;
_battery.updateBatteryStatus(now, vbatt, ibatt, throttle, armed, &battery_status);
_battery.updateBatteryStatus(now, vbatt, ibatt, true, true, 0, throttle, armed, &battery_status);
// publish the battery voltage
int batt_multi;