Skip to content

Commit

Permalink
Remove health_component::avoidance
Browse files Browse the repository at this point in the history
Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer committed Jan 14, 2025
1 parent 8b09e7c commit a94968e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions msg/versioned/ArmingCheckReply.msg
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
uint32 MESSAGE_VERSION = 0
uint32 MESSAGE_VERSION = 1

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

This change does not strictly need a version increase, so I'd keep it at 0 for now (we need #24113 for full version translations)

This comment has been minimized.

Copy link
@sfuhrer

sfuhrer Jan 15, 2025

Author Contributor

Okay reverted the bump. But I guess this other version bump is needed: 68be795
We can also wait with merging this PR and first get the version translation in.

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

Right, that one is needed.


uint64 timestamp # time since system start (microseconds)

uint8 request_id
uint8 registration_id

uint8 HEALTH_COMPONENT_INDEX_NONE = 0

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

Let's keep this one

This comment has been minimized.

Copy link
@sfuhrer

sfuhrer Jan 15, 2025

Author Contributor

Added it back in e9a5485 - but what is it meant for?

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

It's used as a bit offset and NONE just serves as base index

uint8 HEALTH_COMPONENT_INDEX_AVOIDANCE = 19

uint8 health_component_index # HEALTH_COMPONENT_INDEX_*
bool health_component_is_present
bool health_component_warning
Expand Down
4 changes: 2 additions & 2 deletions src/lib/events/enums.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
"description": "Mission"
},
"524288": {
"name": "avoidance",
"description": "Avoidance"
"name": "empty_used_to_be_avoidance",

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

I would just keep it for now, there's others that aren't used (yet) either.
If you want to remove it, it's ok to shift indexes.

This comment has been minimized.

Copy link
@sfuhrer

sfuhrer Jan 15, 2025

Author Contributor

Okay reverted in e9a5485.
If we shift the indexes: is the risk of PX4 being out of sync with the ground station minimal? Because we transmit the jsons to the groundstation on every connection?

This comment has been minimized.

Copy link
@bkueng

bkueng Jan 15, 2025

Member

Yes we transmit the json on connect, but only when changed

"description": "empty - used to be avoidance"
},
"1048576": {
"name": "system",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#include <uORB/Subscription.hpp>
#include <uORB/Publication.hpp>

static_assert((1ull << arming_check_reply_s::HEALTH_COMPONENT_INDEX_AVOIDANCE) == (uint64_t)
health_component_t::avoidance, "enum definition missmatch");

class ExternalChecks : public HealthAndArmingCheckBase
{
public:
Expand Down
1 change: 0 additions & 1 deletion src/modules/mavlink/streams/SYS_STATUS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class MavlinkStreamSysStatus : public MavlinkStream
fillOutComponent(health_report, MAV_SYS_STATUS_SENSOR_BATTERY, health_component_t::battery, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS, health_component_t::motors_escs, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_RECOVERY_SYSTEM, health_component_t::parachute, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_OBSTACLE_AVOIDANCE, health_component_t::avoidance, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_SENSOR_3D_ACCEL, health_component_t::accel, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_SENSOR_3D_GYRO, health_component_t::gyro, msg);
fillOutComponent(health_report, MAV_SYS_STATUS_SENSOR_3D_MAG, health_component_t::magnetometer, msg);
Expand Down

0 comments on commit a94968e

Please sign in to comment.