1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Always use rxGetChannelValue instead of rxGetRawChannelValue

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-11-25 21:33:42 +01:00
parent cb1dd8d039
commit f98f5292da
4 changed files with 3 additions and 13 deletions

View file

@ -571,7 +571,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
case MSP_RC: case MSP_RC:
for (int i = 0; i < rxRuntimeConfig.channelCount; i++) { for (int i = 0; i < rxRuntimeConfig.channelCount; i++) {
sbufWriteU16(dst, rxGetRawChannelValue(i)); sbufWriteU16(dst, rxGetChannelValue(i));
} }
break; break;

View file

@ -994,7 +994,7 @@ static mspResult_e djiProcessMspCommand(mspPacket_t *cmd, mspPacket_t *reply, ms
case DJI_MSP_RC: case DJI_MSP_RC:
// Only send sticks (first 4 channels) // Only send sticks (first 4 channels)
for (int i = 0; i < STICK_CHANNEL_COUNT; i++) { for (int i = 0; i < STICK_CHANNEL_COUNT; i++) {
sbufWriteU16(dst, rxGetRawChannelValue(i)); sbufWriteU16(dst, rxGetChannelValue(i));
} }
break; break;

View file

@ -716,11 +716,6 @@ int16_t rxGetChannelValue(unsigned channelNumber)
return rcChannels[channelNumber].data; return rcChannels[channelNumber].data;
} }
int16_t rxGetRawChannelValue(unsigned channelNumber)
{
return rcChannels[channelNumber].raw;
}
void lqTrackerReset(rxLinkQualityTracker_e * lqTracker) void lqTrackerReset(rxLinkQualityTracker_e * lqTracker)
{ {
lqTracker->lastUpdatedMs = millis(); lqTracker->lastUpdatedMs = millis();

View file

@ -220,10 +220,5 @@ uint16_t rxGetRefreshRate(void);
// Processed RC channel value. These values might include // Processed RC channel value. These values might include
// filtering and some extra processing like value holding // filtering and some extra processing like value holding
// during failsafe. Most callers should use this instead // during failsafe.
// of rxGetRawChannelValue()
int16_t rxGetChannelValue(unsigned channelNumber); int16_t rxGetChannelValue(unsigned channelNumber);
// Raw RC channel data as received by the RX. Should only
// be used by very low level subsystems, like blackbox.
int16_t rxGetRawChannelValue(unsigned channelNumber);