config: change default control loop interval

On an unloaded rotator, this fixes the rapid relay toggling without
needing to implement debouncing.

An additional configuration validation should probably be added: the
rotator rotates in azimuth about 6 deg per second. If the control loop
speed is too slow or the controller angle tolerance is small enough,
then the controller will never be able settle (imagine that the loop
interval is 1 second. That means the rotator will move approximately 6
degrees every loop iteration, so it will always overshoot.
This commit is contained in:
2024-07-10 12:43:11 -07:00
parent ccb507d4d9
commit e4393c2e5a

View File

@@ -114,7 +114,7 @@ controller: ControllerConfig = .{
.elevation_input = .{ .channel = .diff_23, .range = .@"5 V" }, .elevation_input = .{ .channel = .diff_23, .range = .@"5 V" },
.azimuth_outputs = .{ .increase = .{ .io = 0 }, .decrease = .{ .io = 1 } }, .azimuth_outputs = .{ .increase = .{ .io = 0 }, .decrease = .{ .io = 1 } },
.elevation_outputs = .{ .increase = .{ .io = 2 }, .decrease = .{ .io = 3 } }, .elevation_outputs = .{ .increase = .{ .io = 2 }, .decrease = .{ .io = 3 } },
.loop_interval_ns = 50_000_000, .loop_interval_ns = 100_000_000,
.parking_posture = .{ .azimuth = 180, .elevation = 90 }, .parking_posture = .{ .azimuth = 180, .elevation = 90 },
.angle_tolerance = .{ .azimuth = 1, .elevation = 1 }, .angle_tolerance = .{ .azimuth = 1, .elevation = 1 },
.angle_offset = .{ .azimuth = 0, .elevation = 0 }, .angle_offset = .{ .azimuth = 0, .elevation = 0 },