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:
co-authored by
Peter Feerick
Claude Sonnet 5
parent
abeed9f23b
commit
ed71a38726
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user