From ed0129a983fe6cea5f69b9edf77d44f58f82de1f Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 11 Dec 2024 20:27:59 +0100 Subject: [PATCH] RpmControl: remove status message because it by now only contains redundant information --- msg/CMakeLists.txt | 1 - msg/RpmControlStatus.msg | 7 ------- .../ActuatorEffectiveness/RpmControl.hpp | 11 ----------- 3 files changed, 19 deletions(-) delete mode 100644 msg/RpmControlStatus.msg diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index c51b64486f2a..c87e75fb695e 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -193,7 +193,6 @@ set(msg_files RoverMecanumSetpoint.msg RoverMecanumStatus.msg Rpm.msg - RpmControlStatus.msg RtlStatus.msg RtlTimeEstimate.msg SatelliteInfo.msg diff --git a/msg/RpmControlStatus.msg b/msg/RpmControlStatus.msg deleted file mode 100644 index c1ed3dd99771..000000000000 --- a/msg/RpmControlStatus.msg +++ /dev/null @@ -1,7 +0,0 @@ -uint64 timestamp # time since system start (microseconds) - -float32 rpm_raw # measured rpm -float32 rpm_estimate # filtered rpm -float32 rpm_setpoint # desired rpm - -float32 output diff --git a/src/modules/control_allocator/ActuatorEffectiveness/RpmControl.hpp b/src/modules/control_allocator/ActuatorEffectiveness/RpmControl.hpp index 9bdbf562b2da..d303aca45901 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/RpmControl.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/RpmControl.hpp @@ -77,7 +77,6 @@ class RpmControl : public ModuleParams if (_rpm_sub.copy(&rpm)) { _rpm_estimate = rpm.rpm_estimate; - _rpm_raw = rpm.rpm_raw; _timestamp_last_rpm_measurement = rpm.timestamp; } } @@ -102,24 +101,14 @@ class RpmControl : public ModuleParams float output = _pid.update(_rpm_estimate, dt, true); - rpm_control_status_s rpm_control_status{}; - rpm_control_status.rpm_raw = _rpm_raw; - rpm_control_status.rpm_estimate = _rpm_estimate;; - rpm_control_status.rpm_setpoint = _param_ca_heli_rpm_sp.get(); - rpm_control_status.output = output; - rpm_control_status.timestamp = hrt_absolute_time(); - _rpm_control_status_pub.publish(rpm_control_status); - return output; } private: static constexpr float RPM_MAX_VALUE = 1800.f; uORB::Subscription _rpm_sub{ORB_ID(rpm)}; - uORB::Publication _rpm_control_status_pub{ORB_ID(rpm_control_status)}; float _rpm_estimate{0.f}; - float _rpm_raw{0.f}; float _spoolup_progress{0.f}; PID _pid; hrt_abstime _timestamp_last_rpm_measurement{0};