Merge branch 'master' into channel-processing-speedup
This commit is contained in:
4
qsp.cpp
4
qsp.cpp
@@ -93,11 +93,11 @@ void decodeRxHealthPayload(QspConfiguration_t *qsp, RxDeviceState_t *rxDeviceSta
|
||||
/**
|
||||
* Encode 10 RC channels
|
||||
*/
|
||||
void encodeRcDataPayload(QspConfiguration_t *qsp, PPMReader *ppmSource, uint8_t noOfChannels)
|
||||
void encodeRcDataPayload(QspConfiguration_t *qsp, int channels[], uint8_t noOfChannels)
|
||||
{
|
||||
for (uint8_t i = 0; i < noOfChannels; i++)
|
||||
{
|
||||
int cV = constrain(ppmSource->get(i), 1000, 2000) - 1000;
|
||||
int cV = constrain(channels[i], 1000, 2000) - 1000;
|
||||
|
||||
uint16_t channelValue10 = cV & 0x03ff;
|
||||
uint8_t channelValue8 = (cV >> 2) & 0xff;
|
||||
|
||||
Reference in New Issue
Block a user