add PID-related items in mount config
rewrite AsibFM700ServoController methods according to new time point representation in LibSidServo
This commit is contained in:
@@ -238,6 +238,21 @@ static auto Asibfm700MountConfigDefaults = std::make_tuple(
|
||||
std::chrono::milliseconds(100),
|
||||
{"mount axes rate calculation interval in millisecs"}},
|
||||
|
||||
simple_config_record_t{"PIDMaxDt",
|
||||
std::chrono::milliseconds(1000),
|
||||
{"maximal PID refresh time interval in millisecs",
|
||||
"NOTE: if PID data will be refreshed with interval longer than this value (e.g. user polls "
|
||||
"encoder data too rarely)",
|
||||
"then the PID 'expired' data will be cleared and new computing loop is started"}},
|
||||
|
||||
simple_config_record_t{"PIDRefreshDt", std::chrono::milliseconds(100), {"PID refresh interval"}},
|
||||
|
||||
simple_config_record_t{"PIDCycleDt",
|
||||
std::chrono::milliseconds(5000),
|
||||
{"PID I cycle time (analog of 'RC' for PID on opamps)"}},
|
||||
|
||||
|
||||
|
||||
// X-axis coordinate PID P,I,D-params
|
||||
simple_config_record_t{"XPIDC", std::vector<double>{0.8, 0.1, 0.3}, {"X-axis coordinate PID P,I,D-params"}},
|
||||
|
||||
@@ -485,6 +500,16 @@ public:
|
||||
secs = getValue<std::chrono::milliseconds>("EncoderSpeedInterval").value_or(std::chrono::milliseconds{});
|
||||
hw_cfg.devConfig.EncoderSpeedInterval = secs.count();
|
||||
|
||||
secs = getValue<std::chrono::milliseconds>("PIDMaxDt").value_or(std::chrono::milliseconds{1000});
|
||||
hw_cfg.devConfig.PIDMaxDt = secs.count();
|
||||
|
||||
secs = getValue<std::chrono::milliseconds>("PIDRefreshDt").value_or(std::chrono::milliseconds{100});
|
||||
hw_cfg.devConfig.PIDRefreshDt = secs.count();
|
||||
|
||||
secs = getValue<std::chrono::milliseconds>("PIDCycleDt").value_or(std::chrono::milliseconds{5000});
|
||||
hw_cfg.devConfig.PIDCycleDt = secs.count();
|
||||
|
||||
|
||||
std::vector<double> pid = getValue<std::vector<double>>("XPIDC").value_or(std::vector<double>{});
|
||||
if (pid.size() > 2) {
|
||||
hw_cfg.devConfig.XPIDC.P = pid[0];
|
||||
|
||||
Reference in New Issue
Block a user