-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Is your feature request related to a problem? Please describe.
The FlySky receiver FS-IA6B outputs 16-bit channel data on the IBUS, which are available through ibus::getChannel(rc_channels_t *channelData). This being 11-bit data works fine as long as the data stays in the usual range of values from 1000 through to 2000.
However, an RC control can be tuned to output a larger range of values, e.g. 906 to 1058, which leads to an overflow in the rc_channel_t channel values, resulting values above 1047 to be wrapped to values starting with 0.
Describe the solution you'd like
One way to solve the issue would be to add a second getChannel() method, allowing the user to alternatively get the 16-bit channel data:
void ibus::getChannel(ibus_channels_t *channelData) {
memcpy(channelData, (uint8_t *)&_channelData, sizeof(ibus_channels_t));
}Describe alternatives you've considered
A workaround exists on the application level where each channel value 0..499 is wrapped to values 1048..1547, expecting that no receiver outputs values below 500.