Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
ServoConsumerConfig.hxx
1#ifndef _OPENLCB_SERVOCONSUMERCONFIG_HXX_
2#define _OPENLCB_SERVOCONSUMERCONFIG_HXX_
3
5
6namespace openlcb
7{
8
9CDI_GROUP(ServoConsumerConfig);
10CDI_GROUP_ENTRY(description, StringConfigEntry<16>, Name("Description"),
11 Description("User name of this output."));
12CDI_GROUP_ENTRY(event_rotate_min, EventConfigEntry, //
13 Name("Minimum Rotation Event ID"),
14 Description("Receiving this event ID will rotate the servo to its mimimum "
15 "configured point."));
16CDI_GROUP_ENTRY(event_rotate_max, EventConfigEntry, //
17 Name("Maximum Rotation Event ID"),
18 Description("Receiving this event ID will rotate the servo to its maximum "
19 "configured point."));
20#define SERVO_DESCRIPTION_SUFFIX \
21 "stop point of the servo, as a percentage: generally 0-100. " \
22 "May be under/over-driven by setting a percentage value " \
23 "of -99 to 200, respectively."
24CDI_GROUP_ENTRY(servo_min_percent, Int16ConfigEntry, Default(0), Min(-99),
25 Max(200), Name("Servo Minimum Stop Point Percentage"),
26 Description("Low-end " SERVO_DESCRIPTION_SUFFIX));
27CDI_GROUP_ENTRY(servo_max_percent, Int16ConfigEntry, Default(100), Min(-99),
28 Max(200), Name("Servo Maximum Stop Point Percentage"),
29 Description("High-end " SERVO_DESCRIPTION_SUFFIX));
30CDI_GROUP_END(); // ServoConsumerConfig
31
32} // namespace openlcb
33
34#endif // _OPENLCB_SERVOCONSUMERCONFIG_HXX_
#define CDI_GROUP(GroupName, ARGS...)
Starts a CDI group.
#define CDI_GROUP_ENTRY(NAME, TYPE, ARGS...)
Adds an entry to a CDI group.
CDI_GROUP_END()
Signals termination of the group.
NumericConfigEntry< int16_t > Int16ConfigEntry
Signed numeric config entry with 2 bytes width.