Skip to content

✨FEATURE: Allow to get 16-bit ibus channel data #28

@gandy92

Description

@gandy92

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.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions