RpmControl: remove status message because it by now only contains redundant information

This commit is contained in:
Matthias Grob 2024-12-11 20:27:59 +01:00
parent 4050cedfaf
commit ddd410e9d8
3 changed files with 0 additions and 20 deletions

View File

@ -181,7 +181,6 @@ set(msg_files
RoverMecanumSetpoint.msg
RoverMecanumStatus.msg
Rpm.msg
RpmControlStatus.msg
RtlStatus.msg
RtlTimeEstimate.msg
SatelliteInfo.msg

View File

@ -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

View File

@ -50,7 +50,6 @@
#include <uORB/Subscription.hpp>
#include <uORB/topics/pwm_input.h>
#include <uORB/topics/rpm.h>
#include <uORB/topics/rpm_control_status.h>
using namespace time_literals;
@ -77,7 +76,6 @@ public:
if (_rpm_sub.copy(&rpm)) {
_rpm_estimate = rpm.rpm_estimate;
_rpm_raw = rpm.rpm_raw;
_timestamp_last_rpm_measurement = rpm.timestamp;
}
}
@ -102,24 +100,14 @@ public:
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_s> _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};