fix: pxx2 can transport 24 channels (#4871)
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
|
||||
#define PXX2_AUTH_REFUSED_FLAG 0xA5
|
||||
|
||||
#define PXX2_MAX_CHANNELS 24
|
||||
|
||||
// Channel mapping constants
|
||||
#define CH_ENABLE_SPORT 4
|
||||
#define CH_ENABLE_SBUS 5
|
||||
|
||||
Reference in New Issue
Block a user