mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 11:03:33 +08:00
delete module's redundant print_status()
- we can already get the running status from ModuleBase and the other misc information is already available through perf or uORB
This commit is contained in:
@@ -90,8 +90,6 @@ public:
|
||||
/* run the main loop */
|
||||
void Run() override;
|
||||
|
||||
int print_status() override;
|
||||
|
||||
private:
|
||||
static constexpr int MAX_NUM_AIRSPEED_SENSORS = 3; /**< Support max 3 airspeed sensors */
|
||||
enum airspeed_index {
|
||||
@@ -590,19 +588,6 @@ int AirspeedModule::custom_command(int argc, char *argv[])
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int AirspeedModule::print_status()
|
||||
{
|
||||
perf_print_counter(_perf_elapsed);
|
||||
|
||||
int instance = 0;
|
||||
uORB::SubscriptionData<airspeed_validated_s> est{ORB_ID(airspeed_validated), (uint8_t)instance};
|
||||
est.update();
|
||||
PX4_INFO("Number of airspeed sensors: %i", _number_of_airspeed_sensors);
|
||||
print_message(est.get());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int AirspeedModule::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
|
||||
@@ -736,13 +736,6 @@ int FixedwingAttitudeControl::custom_command(int argc, char *argv[])
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int FixedwingAttitudeControl::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
perf_print_counter(_loop_perf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FixedwingAttitudeControl::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
|
||||
@@ -88,9 +88,6 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
bool init();
|
||||
|
||||
@@ -1953,13 +1953,6 @@ int FixedwingPositionControl::custom_command(int argc, char *argv[])
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int FixedwingPositionControl::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
perf_print_counter(_loop_perf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FixedwingPositionControl::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
|
||||
@@ -145,9 +145,6 @@ public:
|
||||
|
||||
bool init();
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
private:
|
||||
orb_advert_t _mavlink_log_pub{nullptr};
|
||||
|
||||
|
||||
@@ -84,9 +84,6 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void start();
|
||||
|
||||
private:
|
||||
@@ -307,13 +304,6 @@ void LoadMon::_stack_usage()
|
||||
}
|
||||
#endif
|
||||
|
||||
int LoadMon::print_status()
|
||||
{
|
||||
PX4_INFO("running");
|
||||
perf_print_counter(_stack_perf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LoadMon::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
|
||||
@@ -78,9 +78,6 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
bool init();
|
||||
|
||||
@@ -378,15 +378,6 @@ int MulticopterAttitudeControl::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int MulticopterAttitudeControl::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
|
||||
perf_print_counter(_loop_perf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MulticopterAttitudeControl::custom_command(int argc, char *argv[])
|
||||
{
|
||||
return print_usage("unknown command");
|
||||
|
||||
@@ -356,15 +356,6 @@ int MulticopterRateControl::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int MulticopterRateControl::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
|
||||
perf_print_counter(_loop_perf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int MulticopterRateControl::custom_command(int argc, char *argv[])
|
||||
{
|
||||
return print_usage("unknown command");
|
||||
|
||||
@@ -75,9 +75,6 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
bool init();
|
||||
|
||||
@@ -511,15 +511,6 @@ RCUpdate::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int
|
||||
RCUpdate::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
perf_print_counter(_loop_perf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
RCUpdate::custom_command(int argc, char *argv[])
|
||||
{
|
||||
|
||||
@@ -87,9 +87,6 @@ public:
|
||||
void Run() override;
|
||||
bool init();
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,11 +55,6 @@
|
||||
using namespace math;
|
||||
using namespace matrix;
|
||||
|
||||
int Sih::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Sih::custom_command(int argc, char *argv[])
|
||||
{
|
||||
|
||||
@@ -79,9 +79,6 @@ public:
|
||||
/** @see ModuleBase::run() */
|
||||
void run() override;
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
static float generate_wgn(); // generate white Gaussian noise sample
|
||||
|
||||
// generate white Gaussian noise sample as a 3D vector with specified std
|
||||
|
||||
@@ -462,14 +462,6 @@ VtolAttitudeControl::custom_command(int argc, char *argv[])
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int
|
||||
VtolAttitudeControl::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
perf_print_counter(_loop_perf);
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
int
|
||||
VtolAttitudeControl::print_usage(const char *reason)
|
||||
{
|
||||
|
||||
@@ -106,9 +106,6 @@ public:
|
||||
|
||||
bool init();
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
bool is_fixed_wing_requested();
|
||||
void abort_front_transition(const char *reason);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user