mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 02:33:34 +08:00
Removed all swapping of uORB instances
This commit is contained in:
committed by
Lorenz Meier
parent
6452b7e014
commit
4c1adc088f
@@ -165,14 +165,6 @@ Battery::publish()
|
||||
orb_publish_auto(ORB_ID(battery_status), &_orb_advert, &_battery_status, &_orb_instance, ORB_PRIO_DEFAULT);
|
||||
}
|
||||
|
||||
void
|
||||
Battery::swapUorbAdvert(Battery &other)
|
||||
{
|
||||
orb_advert_t tmp = _orb_advert;
|
||||
_orb_advert = other._orb_advert;
|
||||
other._orb_advert = tmp;
|
||||
}
|
||||
|
||||
void
|
||||
Battery::filterVoltage(float voltage_v)
|
||||
{
|
||||
|
||||
@@ -108,15 +108,6 @@ public:
|
||||
*/
|
||||
void publish();
|
||||
|
||||
/**
|
||||
* Some old functionality expects the primary battery to be published on instance 0. To maintain backwards
|
||||
* compatibility, this function allows the advertisements (and therefore instances) of 2 batteries to be swapped.
|
||||
* However, this should not be relied upon anywhere, and should be considered for all intents deprecated.
|
||||
*
|
||||
* The proper way to uniquely identify batteries is by the `id` field in the `battery_status` message.
|
||||
*/
|
||||
void swapUorbAdvert(Battery &other);
|
||||
|
||||
protected:
|
||||
struct {
|
||||
param_t v_empty;
|
||||
|
||||
Reference in New Issue
Block a user