fix(ui): Auto adjust PPM frame length if greater than 8 ch (#3622)

* Auto-adjusts PPM frame length if channel count is greater than 8 channels

* added auto adjust for PPM trainer mode on b&w targets

* code cleanup
This commit is contained in:
Michael
2023-05-31 13:29:17 +10:00
committed by GitHub
parent 892d2b183b
commit e25c6d8a99
9 changed files with 81 additions and 30 deletions
+6
View File
@@ -788,6 +788,12 @@ inline void setDefaultPpmFrameLength(uint8_t moduleIdx)
4 * max<int>(0, g_model.moduleData[moduleIdx].channelsCount);
}
inline void setDefaultPpmFrameLengthTrainer()
{
g_model.trainerData.frameLength =
4 * max<int>(0, g_model.trainerData.channelsCount);
}
inline void resetAccessAuthenticationCount()
{
// the module will reset on mode switch, we need to reset the authentication counter