fix(cpn): ModelData usage due to introduction of non-trivial data types (#6877)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
Neil Horne
2025-12-22 20:13:13 +10:00
committed by GitHub
co-authored by philmoz
parent 9725c948a7
commit 41c08b86d1
9 changed files with 414 additions and 75 deletions
+8
View File
@@ -65,6 +65,14 @@ void ModuleData::convert(RadioDataConversionState & cstate)
}
}
void ModuleData::clear()
{
memset(reinterpret_cast<void *>(this), 0, sizeof(ModuleData));
protocol = PULSES_OFF;
channelsCount = 8;
ppm.delay = 300;
}
// moved from OpenTxFirmware EdgeTX v2.9
// only called by ModuleData::convert
// TODO: merge with ModuleData::isProtocolAvailable as share much of the same logic