main: respect elevation mask
This is done silently, in the sense that the UI doesn't show that it is clamping the requested pointing target in this way.
This commit is contained in:
@@ -180,10 +180,15 @@ pub const RotInt = struct {
|
||||
self.pollcount = (self.pollcount + 1) % self.command_freq;
|
||||
|
||||
if (self.pollcount == 0) {
|
||||
const mangled: AzEl = .{
|
||||
var mangled: AzEl = .{
|
||||
.az = self.requested_posture.az + self.offsets.az,
|
||||
.el = self.requested_posture.el + self.offsets.el,
|
||||
};
|
||||
mangled.el = if (mangled.el > 90)
|
||||
@min(mangled.el, 180 - self.conf.elevation_mask)
|
||||
else
|
||||
@max(mangled.el, self.conf.elevation_mask);
|
||||
|
||||
self.sendRotatorCommand(.{ .set_position = mangled });
|
||||
} else {
|
||||
self.sendRotatorCommand(.get_position);
|
||||
|
Reference in New Issue
Block a user