feat(firmware): add 'user data' section to model yaml for Lua scripts (#7562)

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
philmoz
2026-09-18 09:04:48 +10:00
committed by GitHub
co-authored by Peter Feerick Claude Sonnet 5
parent abeed9f23b
commit ed71a38726
45 changed files with 1105 additions and 16 deletions
+12
View File
@@ -126,6 +126,16 @@ class CustomSwitchData {
void clear() { memset(reinterpret_cast<void *>(this), 0, sizeof(CustomSwitchData)); }
};
// Key/Value data for Lua scripts
class UserData {
public:
UserData() { clear(); }
unsigned int type;
std::string key;
std::string value;
void clear() { key.clear(); value.clear(); type = 0; }
};
class ModelData {
Q_DECLARE_TR_FUNCTIONS(ModelData)
@@ -239,6 +249,8 @@ class ModelData {
QByteArray checklistData;
UserData userData[CPN_MAX_USER_DATA];
ModelData & operator=(const ModelData & src);
void convert(RadioDataConversionState & cstate);