Removed all swapping of uORB instances

This commit is contained in:
Timothy Scott
2020-02-21 22:38:26 -08:00
committed by Lorenz Meier
parent 6452b7e014
commit 4c1adc088f
5 changed files with 77 additions and 104 deletions
-8
View File
@@ -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)
{
-9
View File
@@ -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;