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:
Peter Barker
2026-05-07 09:33:15 +10:00
committed by Peter Barker
co-authored by Claude Haiku 4.5
parent 1a1898f51a
commit 8f112cb18a
+7 -1
View File
@@ -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];