mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
going via the static methods threw away the const-correctness so we need a bunch of non-const equivalents of several const methods Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
43 lines
882 B
C++
43 lines
882 B
C++
#pragma once
|
|
|
|
#include <RC_Channel/RC_Channel.h>
|
|
|
|
class RC_Channel_Tracker : public RC_Channel
|
|
{
|
|
|
|
public:
|
|
|
|
protected:
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
class RC_Channels_Tracker : public RC_Channels
|
|
{
|
|
public:
|
|
|
|
RC_Channel_Tracker obj_channels[NUM_RC_CHANNELS];
|
|
RC_Channel_Tracker *channel(const uint8_t chan) override {
|
|
if (chan >= ARRAY_SIZE(obj_channels)) {
|
|
return nullptr;
|
|
}
|
|
return &obj_channels[chan];
|
|
}
|
|
const RC_Channel_Tracker *channel(const uint8_t chan) const override {
|
|
if (chan >= ARRAY_SIZE(obj_channels)) {
|
|
return nullptr;
|
|
}
|
|
return &obj_channels[chan];
|
|
}
|
|
|
|
// we always trust our RC inputs ATM:
|
|
bool in_rc_failsafe() const override { return false; }
|
|
|
|
protected:
|
|
|
|
// note that these callbacks are not presently used on Tracker:
|
|
int8_t flight_mode_channel_number() const override;
|
|
|
|
};
|