@@ -749,6 +749,7 @@ PACK(struct StepsCalibData {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PACK(struct CalibData {
|
PACK(struct CalibData {
|
||||||
|
CUST_IDX(calib, r_calib, w_calib);
|
||||||
int16_t mid;
|
int16_t mid;
|
||||||
int16_t spanNeg;
|
int16_t spanNeg;
|
||||||
int16_t spanPos;
|
int16_t spanPos;
|
||||||
@@ -837,7 +838,7 @@ PACK(struct RadioData {
|
|||||||
// Real attributes
|
// Real attributes
|
||||||
NOBACKUP(uint8_t version);
|
NOBACKUP(uint8_t version);
|
||||||
NOBACKUP(uint16_t variant SKIP);
|
NOBACKUP(uint16_t variant SKIP);
|
||||||
CalibData calib[NUM_STICKS + STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS + STORAGE_NUM_MOUSE_ANALOGS];
|
CalibData calib[NUM_STICKS + STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS + STORAGE_NUM_MOUSE_ANALOGS] NO_IDX;
|
||||||
NOBACKUP(uint16_t chkSum SKIP);
|
NOBACKUP(uint16_t chkSum SKIP);
|
||||||
N_HORUS_FIELD(int8_t currModel);
|
N_HORUS_FIELD(int8_t currModel);
|
||||||
N_HORUS_FIELD(uint8_t contrast);
|
N_HORUS_FIELD(uint8_t contrast);
|
||||||
|
|||||||
@@ -262,6 +262,18 @@ uint8_t select_sensor_cfg(void* user, uint8_t* data, uint32_t bitoffs)
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define r_calib nullptr
|
||||||
|
|
||||||
|
static bool w_calib(void* user, yaml_writer_func wf, void* opaque)
|
||||||
|
{
|
||||||
|
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||||
|
uint16_t idx = tw->getElmts();
|
||||||
|
|
||||||
|
const char* str =
|
||||||
|
yaml_output_enum(idx + MIXSRC_Rud, enum_MixSources);
|
||||||
|
return str ? wf(opaque, str, strlen(str)) : true;
|
||||||
|
}
|
||||||
|
|
||||||
bool sw_write(void* user, yaml_writer_func wf, void* opaque)
|
bool sw_write(void* user, yaml_writer_func wf, void* opaque)
|
||||||
{
|
{
|
||||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -451,6 +451,26 @@ static uint8_t select_sensor_cfg(void* user, uint8_t* data, uint32_t bitoffs)
|
|||||||
return yaml_conv_220::select_sensor_cfg(user, data, bitoffs);
|
return yaml_conv_220::select_sensor_cfg(user, data, bitoffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint32_t r_calib(void* user, const char* val, uint8_t val_len)
|
||||||
|
{
|
||||||
|
(void)user;
|
||||||
|
|
||||||
|
uint32_t sw = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||||
|
if (sw >= MIXSRC_Rud) return sw - MIXSRC_Rud;
|
||||||
|
|
||||||
|
return (uint32_t)yaml_str2int(val, val_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool w_calib(void* user, yaml_writer_func wf, void* opaque)
|
||||||
|
{
|
||||||
|
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||||
|
uint16_t idx = tw->getElmts();
|
||||||
|
|
||||||
|
const char* str =
|
||||||
|
yaml_output_enum(idx + MIXSRC_Rud, enum_MixSources);
|
||||||
|
return str ? wf(opaque, str, strlen(str)) : true;
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t sw_read(void* user, const char* val, uint8_t val_len)
|
static uint32_t sw_read(void* user, const char* val, uint8_t val_len)
|
||||||
{
|
{
|
||||||
(void)user;
|
(void)user;
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ const struct YamlIdStr enum_TelemetrySensorType[] = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
static const struct YamlNode struct_CalibData[] = {
|
static const struct YamlNode struct_CalibData[] = {
|
||||||
YAML_IDX,
|
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||||
YAML_SIGNED( "mid", 16 ),
|
YAML_SIGNED( "mid", 16 ),
|
||||||
YAML_SIGNED( "spanNeg", 16 ),
|
YAML_SIGNED( "spanNeg", 16 ),
|
||||||
YAML_SIGNED( "spanPos", 16 ),
|
YAML_SIGNED( "spanPos", 16 ),
|
||||||
|
|||||||
@@ -52,6 +52,10 @@
|
|||||||
int _dummy_##tag[0] _yaml_attribute("raw:YAML_ARRAY(" _yaml_note( \
|
int _dummy_##tag[0] _yaml_attribute("raw:YAML_ARRAY(" _yaml_note( \
|
||||||
#tag) ", 0, 4, " _yaml_note(elmt_type) ", " _yaml_note(fcn) ")")
|
#tag) ", 0, 4, " _yaml_note(elmt_type) ", " _yaml_note(fcn) ")")
|
||||||
|
|
||||||
|
#define CUST_IDX(tag, read, write) \
|
||||||
|
int _dummy_##tag[0] _yaml_attribute("raw:YAML_IDX_CUST(" _yaml_note( \
|
||||||
|
#tag) "," _yaml_note(read) "," _yaml_note(write) ")")
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define ENUM(label)
|
#define ENUM(label)
|
||||||
@@ -64,6 +68,7 @@
|
|||||||
#define ARRAY(elmt_size, elmt_type, fcn)
|
#define ARRAY(elmt_size, elmt_type, fcn)
|
||||||
#define CUST_ATTR(tag, read, write)
|
#define CUST_ATTR(tag, read, write)
|
||||||
#define CUST_ARRAY(tag, elmt_type, fcn)
|
#define CUST_ARRAY(tag, elmt_type, fcn)
|
||||||
|
#define CUST_IDX(tag, read, write)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user