mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 13:28:53 +08:00
Nuttx: fixed missing changes from AppMgr to AppState
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
using namespace px4;
|
||||
|
||||
PublisherExample::PublisherExample() :
|
||||
_n(mgr),
|
||||
_n(appState),
|
||||
_rc_channels_pub(_n.advertise<px4_rc_channels>()),
|
||||
_v_att_pub(_n.advertise<px4_vehicle_attitude>()),
|
||||
_parameter_update_pub(_n.advertise<px4_parameter_update>())
|
||||
@@ -55,7 +55,7 @@ int PublisherExample::main()
|
||||
{
|
||||
px4::Rate loop_rate(10);
|
||||
|
||||
while (!mgr.exitRequested()) {
|
||||
while (!appState.exitRequested()) {
|
||||
loop_rate.sleep();
|
||||
_n.spinOnce();
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
int main();
|
||||
|
||||
static px4::AppMgr mgr;
|
||||
static px4::AppState appState;
|
||||
protected:
|
||||
px4::NodeHandle _n;
|
||||
px4::Publisher<px4::px4_rc_channels> *_rc_channels_pub;
|
||||
|
||||
@@ -49,7 +49,7 @@ void rc_channels_callback_function(const px4_rc_channels &msg)
|
||||
}
|
||||
|
||||
SubscriberExample::SubscriberExample() :
|
||||
_n(_mgr),
|
||||
_n(_appState),
|
||||
_p_sub_interv("SUB_INTERV", PARAM_SUB_INTERV_DEFAULT),
|
||||
_p_test_float("SUB_TESTF", PARAM_SUB_TESTF_DEFAULT)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
px4::ParameterFloat _p_test_float;
|
||||
px4::Subscriber<px4_rc_channels> *_sub_rc_chan;
|
||||
|
||||
AppMgr _mgr;
|
||||
AppState _appState;
|
||||
|
||||
void rc_channels_callback(const px4_rc_channels &msg);
|
||||
void vehicle_attitude_callback(const px4_vehicle_attitude &msg);
|
||||
|
||||
Reference in New Issue
Block a user