mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 05:11:36 +08:00
battery: separate out publishing from updating
to allow smart battery drivers to use the battery class and filling in additional information in case it makes sense.
This commit is contained in:
@@ -97,6 +97,16 @@ public:
|
||||
*/
|
||||
void updateBatteryStatus(const hrt_abstime ×tamp);
|
||||
|
||||
battery_status_s getBatteryStatus();
|
||||
void publishBatteryStatus(const battery_status_s &battery_status);
|
||||
|
||||
/**
|
||||
* Convenience function for combined update and publication
|
||||
* @see updateBatteryStatus()
|
||||
* @see publishBatteryStatus()
|
||||
*/
|
||||
void updateAndPublishBatteryStatus(const hrt_abstime ×tamp);
|
||||
|
||||
protected:
|
||||
struct {
|
||||
param_t v_empty;
|
||||
|
||||
Reference in New Issue
Block a user