mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 16:03:34 +08:00
WorkItem modules: Run() shouldn't be public
This commit is contained in:
@@ -242,11 +242,10 @@ public:
|
||||
|
||||
void resume();
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
private:
|
||||
SMBus *_interface;
|
||||
|
||||
perf_counter_t _cycle{perf_alloc(PC_ELAPSED, "batt_smbus_cycle")};
|
||||
|
||||
@@ -65,8 +65,6 @@ public:
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
protected:
|
||||
|
||||
int collect() override;
|
||||
@@ -74,6 +72,8 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
uORB::Subscription _sub_pwm_input{ORB_ID(pwm_input)};
|
||||
|
||||
pwm_input_s _pwm{};
|
||||
|
||||
@@ -127,8 +127,6 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
void Run() override;
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
@@ -165,6 +163,9 @@ public:
|
||||
bool telemetryEnabled() const { return _telemetry != nullptr; }
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
static constexpr uint16_t DISARMED_VALUE = 0;
|
||||
|
||||
enum class DShotConfig {
|
||||
|
||||
@@ -369,10 +369,10 @@ protected:
|
||||
|
||||
friend class ICM20948_mag;
|
||||
|
||||
void Run() override;
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
PX4Accelerometer _px4_accel;
|
||||
PX4Gyroscope _px4_gyro;
|
||||
|
||||
|
||||
@@ -254,10 +254,10 @@ protected:
|
||||
|
||||
friend class MPU9250_mag;
|
||||
|
||||
void Run() override;
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
PX4Accelerometer _px4_accel;
|
||||
PX4Gyroscope _px4_gyro;
|
||||
|
||||
|
||||
@@ -61,14 +61,15 @@ public:
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
int ioctl(device::file_t *filp, int cmd, unsigned long arg) override;
|
||||
|
||||
bool updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
|
||||
unsigned num_outputs, unsigned num_control_groups_updated) override;
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
static constexpr uint16_t PWM_SIM_DISARMED_MAGIC = 900;
|
||||
static constexpr uint16_t PWM_SIM_FAILSAFE_MAGIC = 600;
|
||||
static constexpr uint16_t PWM_SIM_PWM_MIN_MAGIC = 1000;
|
||||
|
||||
@@ -77,15 +77,15 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
/** @see ModuleBase::run() */
|
||||
void Run() override;
|
||||
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
int init();
|
||||
|
||||
private:
|
||||
|
||||
void Run() override;
|
||||
|
||||
enum RC_SCAN {
|
||||
RC_SCAN_PPM = 0,
|
||||
RC_SCAN_SBUS,
|
||||
|
||||
@@ -55,7 +55,7 @@ class SafetyButton : public ModuleBase<SafetyButton>, public px4::ScheduledWorkI
|
||||
{
|
||||
public:
|
||||
SafetyButton();
|
||||
virtual ~SafetyButton();
|
||||
~SafetyButton() override;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
@@ -69,11 +69,10 @@ public:
|
||||
/** @see ModuleBase::print_status() */
|
||||
int print_status() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
int Start();
|
||||
|
||||
private:
|
||||
void Run() override;
|
||||
|
||||
void CheckButton();
|
||||
void FlashButton();
|
||||
|
||||
Reference in New Issue
Block a user