Tracker: move handling of RC switches into RC_Channel

This commit is contained in:
Peter Barker 2018-04-29 20:22:16 +10:00 committed by Randy Mackay
parent 5df70cf93a
commit 978cd64a1e
2 changed files with 14 additions and 65 deletions

View File

@ -2,70 +2,16 @@
#include "RC_Channel.h" #include "RC_Channel.h"
const AP_Param::GroupInfo RC_Channels::var_info[] = { // defining these two macros and including the RC_Channels_VarInfo
// @Group: 1_ // header defines the parameter information common to all vehicle
// @Path: RC_Channel.cpp // types
AP_SUBGROUPINFO(obj_channels[0], "1_", 1, RC_Channels_Tracker, RC_Channel_Tracker), #define RC_CHANNELS_SUBCLASS RC_Channels_Tracker
#define RC_CHANNEL_SUBCLASS RC_Channel_Tracker
// @Group: 2_ #include <RC_Channel/RC_Channels_VarInfo.h>
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[1], "2_", 2, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 3_ // note that this callback is not presently used on Plane:
// @Path: RC_Channel.cpp int8_t RC_Channels_Tracker::flight_mode_channel_number() const
AP_SUBGROUPINFO(obj_channels[2], "3_", 3, RC_Channels_Tracker, RC_Channel_Tracker), {
return 1; // tracker does not have a flight mode channel
// @Group: 4_ }
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[3], "4_", 4, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 5_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[4], "5_", 5, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 6_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[5], "6_", 6, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 7_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[6], "7_", 7, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 8_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[7], "8_", 8, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 9_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[8], "9_", 9, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 10_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[9], "10_", 10, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 11_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[10], "11_", 11, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 12_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[11], "12_", 12, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 13_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[12], "13_", 13, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 14_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[13], "14_", 14, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 15_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[14], "15_", 15, RC_Channels_Tracker, RC_Channel_Tracker),
// @Group: 16_
// @Path: RC_Channel.cpp
AP_SUBGROUPINFO(obj_channels[15], "16_", 16, RC_Channels_Tracker, RC_Channel_Tracker),
AP_GROUPEND
};

View File

@ -27,4 +27,7 @@ public:
protected: protected:
// note that these callbacks are not presently used on Tracker:
int8_t flight_mode_channel_number() const override;
}; };