mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
Blimp: fixes for static RC_Channel methods going away
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>
This commit is contained in:
committed by
Peter Barker
co-authored by
Claude Haiku 4.5
parent
1a1898f51a
commit
8f112cb18a
@@ -37,7 +37,13 @@ public:
|
||||
RC_Channel_Blimp obj_channels[NUM_RC_CHANNELS];
|
||||
RC_Channel_Blimp *channel(const uint8_t chan) override
|
||||
{
|
||||
if (chan >= NUM_RC_CHANNELS) {
|
||||
if (chan >= ARRAY_SIZE(obj_channels)) {
|
||||
return nullptr;
|
||||
}
|
||||
return &obj_channels[chan];
|
||||
}
|
||||
const RC_Channel_Blimp *channel(const uint8_t chan) const override {
|
||||
if (chan >= ARRAY_SIZE(obj_channels)) {
|
||||
return nullptr;
|
||||
}
|
||||
return &obj_channels[chan];
|
||||
|
||||
Reference in New Issue
Block a user