From 419bbd8d160a17c205118e65ba212c51617b03be Mon Sep 17 00:00:00 2001 From: Mike Dunston Date: Fri, 22 Nov 2024 07:23:03 -0800 Subject: [PATCH] Add LinkRef/LinkText to Group/Segment and Identification. --- src/openlcb/ConfigRenderer.hxx | 70 +++++++++++++++++++++++----- src/openlcb/ConfigRepresentation.hxx | 2 + 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/src/openlcb/ConfigRenderer.hxx b/src/openlcb/ConfigRenderer.hxx index 102dc463f..47b90b64a 100644 --- a/src/openlcb/ConfigRenderer.hxx +++ b/src/openlcb/ConfigRenderer.hxx @@ -55,7 +55,8 @@ struct AtomConfigDefs DECLARE_OPTIONALARG(Hints, hints, const char *, 3, nullptr); DECLARE_OPTIONALARG(SkipInit, skip_init, int, 15, 0); DECLARE_OPTIONALARG(Offset, offset, int, 10, 0); - using Base = OptionalArg; + using Base = OptionalArg; }; /// Configuration implementation class for CDI Atom elements (strings, events @@ -99,7 +100,7 @@ public: } if (hints()) { - *r += StringPrintf("%s\n", mapvalues()); + *r += StringPrintf("%s\n", hints()); } } }; @@ -190,6 +191,10 @@ public: *r += StringPrintf("%s\n", description()); } + if (hints()) + { + *r += StringPrintf("%s\n", hints()); + } if (minvalue() != INT_MAX) { *r += StringPrintf("%d\n", minvalue()); @@ -206,10 +211,6 @@ public: { *r += StringPrintf("%s\n", mapvalues()); } - if (hints()) - { - *r += StringPrintf("%s\n", mapvalues()); - } } int clip(int value) { @@ -275,8 +276,12 @@ struct GroupConfigDefs : public AtomConfigDefs DECLARE_OPTIONALARG(RepName, repname, const char*, 12, nullptr); DECLARE_OPTIONALARG(FixedSize, fixed_size, unsigned, 13, 0); DECLARE_OPTIONALARG(Hidden, hidden, int, 14, 0); + // 15 is used for SkipInit + DECLARE_OPTIONALARG(LinkRef, linkref, const char *, 16, nullptr); + DECLARE_OPTIONALARG(LinkText, linktext, const char *, 17, nullptr); using Base = OptionalArg