mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 00:43:58 -04:00
29 lines
707 B
C++
29 lines
707 B
C++
#include "Plane.h"
|
|
|
|
#include "RC_Channel.h"
|
|
|
|
// defining these two macros and including the RC_Channels_VarInfo
|
|
// header defines the parameter information common to all vehicle
|
|
// types
|
|
#define RC_CHANNELS_SUBCLASS RC_Channels_Plane
|
|
#define RC_CHANNEL_SUBCLASS RC_Channel_Plane
|
|
|
|
#include <RC_Channel/RC_Channels_VarInfo.h>
|
|
|
|
// note that this callback is not presently used on Plane:
|
|
int8_t RC_Channels_Plane::flight_mode_channel_number() const
|
|
{
|
|
return plane.g.flight_mode_channel.get();
|
|
}
|
|
|
|
bool RC_Channels_Plane::has_valid_input() const
|
|
{
|
|
if (plane.failsafe.rc_failsafe) {
|
|
return false;
|
|
}
|
|
if (plane.failsafe.throttle_counter != 0) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|