Added basic support for PartialModel load

This commit is contained in:
Raphael Coeffic
2021-11-10 11:06:59 +01:00
parent cbde43cbeb
commit 713579b238
6 changed files with 42 additions and 9 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ endif()
set(YAML_GEN ${RADIO_DIRECTORY}/util/generate_yaml.py)
set(YAML_GEN_TEMPLATE ${RADIO_DIRECTORY}/util/yaml_parser.tmpl)
SET(YAML_NODES "\"RadioData,ModelData\"")
SET(YAML_NODES "\"RadioData,ModelData,PartialModel\"")
set(YAML_GEN_ARGS myeeprom.h ${YAML_GEN_TEMPLATE} ${YAML_NODES} -DYAML_GENERATOR)
get_property(flags DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
@@ -26,5 +26,6 @@ struct YamlNode;
const YamlNode* get_radiodata_nodes();
const YamlNode* get_modeldata_nodes();
const YamlNode* get_partialmodel_nodes();
#endif
@@ -769,8 +769,13 @@ static const struct YamlNode struct_ModelData[] = {
YAML_STRING("modelRegistrationID", 8),
YAML_END
};
static const struct YamlNode struct_PartialModel[] = {
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_END
};
#define MAX_RADIODATA_MODELDATA_STR_LEN 24
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
@@ -784,4 +789,10 @@ const YamlNode* get_modeldata_nodes()
{
return &__ModelData_root_node;
}
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
const YamlNode* get_partialmodel_nodes()
{
return &__PartialModel_root_node;
}
@@ -770,8 +770,13 @@ static const struct YamlNode struct_ModelData[] = {
YAML_STRING("modelRegistrationID", 8),
YAML_END
};
static const struct YamlNode struct_PartialModel[] = {
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
YAML_END
};
#define MAX_RADIODATA_MODELDATA_STR_LEN 24
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
@@ -785,4 +790,10 @@ const YamlNode* get_modeldata_nodes()
{
return &__ModelData_root_node;
}
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
const YamlNode* get_partialmodel_nodes()
{
return &__PartialModel_root_node;
}