1+ #pragma once
2+
3+ template <typename T, typename Cls>
4+ void bind_sparkbaseconfig_apply (Cls &cls) {
5+ using namespace rev ::spark;
6+
7+ auto sparkBaseConfigType = py::type::of<SparkBaseConfig>();
8+
9+ cls
10+ .def (" apply" , [=](T &self, SparkBaseConfig &config) -> T& {
11+ sparkBaseConfigType.attr (" apply" )(self, config);
12+ return self;
13+ }, py::arg (" config" ))
14+ .def (" apply" , [=](T &self, AbsoluteEncoderConfig &config) -> T& {
15+ sparkBaseConfigType.attr (" apply" )(self, config);
16+ return self;
17+ }, py::arg (" config" ))
18+ .def (" apply" , [=](T &self, AnalogSensorConfig &config) -> T& {
19+ sparkBaseConfigType.attr (" apply" )(self, config);
20+ return self;
21+ }, py::arg (" config" ))
22+ .def (" apply" , [=](T &self, EncoderConfig &config) -> T& {
23+ sparkBaseConfigType.attr (" apply" )(self, config);
24+ return self;
25+ }, py::arg (" config" ))
26+ .def (" apply" , [=](T &self, LimitSwitchConfig &config) -> T& {
27+ sparkBaseConfigType.attr (" apply" )(self, config);
28+ return self;
29+ }, py::arg (" config" ))
30+ .def (" apply" , [=](T &self, SoftLimitConfig &config) -> T& {
31+ sparkBaseConfigType.attr (" apply" )(self, config);
32+ return self;
33+ }, py::arg (" config" ))
34+ .def (" apply" , [=](T &self, ClosedLoopConfig &config) -> T& {
35+ sparkBaseConfigType.attr (" apply" )(self, config);
36+ return self;
37+ }, py::arg (" config" ))
38+ .def (" apply" , [=](T &self, SignalsConfig &config) -> T& {
39+ sparkBaseConfigType.attr (" apply" )(self, config);
40+ return self;
41+ }, py::arg (" config" ))
42+ ;
43+ }
0 commit comments