Fixes
This commit is contained in:
@@ -206,14 +206,26 @@ static const int8_t maxChannelsXJT[] = { 0, 8, 0, 4 }; // relative to 8!
|
||||
constexpr int8_t MAX_TRAINER_CHANNELS_M8 = MAX_TRAINER_CHANNELS - 8;
|
||||
constexpr int8_t MAX_EXTRA_MODULE_CHANNELS_M8 = 8; // only 16ch PPM
|
||||
|
||||
inline uint8_t getPinOuput(uint8_t receiverIdx, uint8_t moduleIdx, uint8_t pin)
|
||||
inline uint8_t getPinOuput(uint8_t receiverIdx, uint8_t pin)
|
||||
{
|
||||
// TODO return ((g_model.moduleData[moduleIdx].pxx2.receivers[receiverIdx].channelMapping >> (pin + ((pin & 0x01) ? -1 : 1 )) * 4) & 0x0F);
|
||||
if (pin < 12) {
|
||||
return ((g_model.receiverData[receiverIdx].channelMapping0 >> (pin * 5)) & 0x1F);
|
||||
}
|
||||
else {
|
||||
pin -= 12;
|
||||
return ((g_model.receiverData[receiverIdx].channelMapping1 >> (pin * 5)) & 0x1F);
|
||||
}
|
||||
}
|
||||
|
||||
inline void setPinOuput(uint8_t receiverIdx, uint8_t moduleIdx, uint8_t pin, uint8_t chan)
|
||||
inline void setPinOuput(uint8_t receiverIdx, uint8_t pin, uint8_t chan)
|
||||
{
|
||||
// TODO g_model.moduleData[moduleIdx].pxx2.receivers[receiverIdx].channelMapping = BF_SET<uint64_t>(g_model.moduleData[moduleIdx].pxx2.receivers[receiverIdx].channelMapping, chan, (pin + ((pin & 0x01) ? -1 : 1 )) * 4, 4);
|
||||
if (pin < 12) {
|
||||
g_model.receiverData[receiverIdx].channelMapping0 = BF_SET<uint64_t>(g_model.receiverData[receiverIdx].channelMapping0, chan, pin * 5, 5);
|
||||
}
|
||||
else {
|
||||
pin -= 12;
|
||||
g_model.receiverData[receiverIdx].channelMapping1 = BF_SET<uint64_t>(g_model.receiverData[receiverIdx].channelMapping1, chan, pin * 5, 5);
|
||||
}
|
||||
}
|
||||
|
||||
inline int8_t maxModuleChannels_M8(uint8_t idx)
|
||||
|
||||
Reference in New Issue
Block a user