mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 13:41:37 +08:00
rc_loss_alarm: formatting
This commit is contained in:
committed by
Beat Küng
parent
0f2c710237
commit
96a0594078
@@ -131,11 +131,11 @@ rc_loss_alarm start
|
|||||||
)DESCR_STR");
|
)DESCR_STR");
|
||||||
|
|
||||||
PRINT_MODULE_USAGE_NAME("rc_loss_alarm", "driver");
|
PRINT_MODULE_USAGE_NAME("rc_loss_alarm", "driver");
|
||||||
PRINT_MODULE_USAGE_COMMAND_DESCR("start", "Start the task");
|
PRINT_MODULE_USAGE_COMMAND_DESCR("start", "Start the task");
|
||||||
PRINT_MODULE_USAGE_COMMAND_DESCR("stop", "Stop the task");
|
PRINT_MODULE_USAGE_COMMAND_DESCR("stop", "Stop the task");
|
||||||
PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Display running status of task");
|
PRINT_MODULE_USAGE_COMMAND_DESCR("status", "Display running status of task");
|
||||||
PRINT_MODULE_USAGE_COMMAND_DESCR("test", "Start alarm tune, can be stopped with 'reset'");
|
PRINT_MODULE_USAGE_COMMAND_DESCR("test", "Start alarm tune, can be stopped with 'reset'");
|
||||||
PRINT_MODULE_USAGE_COMMAND_DESCR("reset", "Resets internal state and stops an eventual alarm");
|
PRINT_MODULE_USAGE_COMMAND_DESCR("reset", "Resets internal state and stops an eventual alarm");
|
||||||
return PX4_OK;
|
return PX4_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
#include <uORB/uORB.h>
|
#include <uORB/uORB.h>
|
||||||
#include <uORB/topics/vehicle_status.h>
|
#include <uORB/topics/vehicle_status.h>
|
||||||
|
|
||||||
#define UPDATE_RATE (1000000 / 1) /* microseconds, 1 Hz */
|
#define UPDATE_RATE (1000000) /* microseconds, 1 Hz */
|
||||||
|
|
||||||
class RC_Loss_Alarm: public ModuleBase<RC_Loss_Alarm>
|
class RC_Loss_Alarm: public ModuleBase<RC_Loss_Alarm>
|
||||||
{
|
{
|
||||||
@@ -60,16 +60,16 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static struct work_s _work;
|
static struct work_s _work;
|
||||||
int _vehicle_status_sub = -1;
|
int _vehicle_status_sub = -1;
|
||||||
struct vehicle_status_s _vehicle_status = {};
|
struct vehicle_status_s _vehicle_status = {};
|
||||||
static orb_advert_t _tune_control_pub;
|
static orb_advert_t _tune_control_pub;
|
||||||
static bool _was_armed;
|
static bool _was_armed;
|
||||||
|
|
||||||
static void cycle_trampoline(void *arg);
|
static void cycle_trampoline(void *arg);
|
||||||
void cycle();
|
void cycle();
|
||||||
static void pub_tune();
|
static void pub_tune();
|
||||||
static void stop_tune();
|
static void stop_tune();
|
||||||
static int reset_module();
|
static int reset_module();
|
||||||
|
|
||||||
// Hide all but the default constructor
|
// Hide all but the default constructor
|
||||||
RC_Loss_Alarm(const RC_Loss_Alarm &other);
|
RC_Loss_Alarm(const RC_Loss_Alarm &other);
|
||||||
|
|||||||
Reference in New Issue
Block a user