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:
parent
511f2ca903
commit
b6caab906a
@ -180,10 +180,15 @@ pub const RotInt = struct {
|
|||||||
self.pollcount = (self.pollcount + 1) % self.command_freq;
|
self.pollcount = (self.pollcount + 1) % self.command_freq;
|
||||||
|
|
||||||
if (self.pollcount == 0) {
|
if (self.pollcount == 0) {
|
||||||
const mangled: AzEl = .{
|
var mangled: AzEl = .{
|
||||||
.az = self.requested_posture.az + self.offsets.az,
|
.az = self.requested_posture.az + self.offsets.az,
|
||||||
.el = self.requested_posture.el + self.offsets.el,
|
.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 });
|
self.sendRotatorCommand(.{ .set_position = mangled });
|
||||||
} else {
|
} else {
|
||||||
self.sendRotatorCommand(.get_position);
|
self.sendRotatorCommand(.get_position);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user