fix: pxx2 can transport 24 channels (#4871)

This commit is contained in:
3djc
2024-04-15 09:28:57 +10:00
committed by GitHub
parent eb472dd80a
commit 8a57e48f55
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -472,7 +472,7 @@ void Pxx2Pulses::setupReceiverSettingsFrame(uint8_t module, int16_t* channels, u
if (reusableBuffer.hardwareAndSettings.receiverSettings.sbus24)
flag1 |= PXX2_RX_SETTINGS_FLAG1_SBUS24;
Pxx2Transport::addByte(flag1);
uint8_t outputsCount = min<uint8_t>(24, reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount);
uint8_t outputsCount = min<uint8_t>(PXX2_MAX_CHANNELS, reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount);
for (int i = 0; i < outputsCount; i++) {
Pxx2Transport::addByte(reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[i]);
}