Skip to content

Commit

Permalink
disconnect from telescope if the coordinates are in alert
Browse files Browse the repository at this point in the history
  • Loading branch information
pchev committed Mar 4, 2019
1 parent dd9d752 commit 912d39e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions skychart/pu_indiclient.pas
Expand Up @@ -371,12 +371,19 @@ procedure Tpop_indi.NewProperty(indiProp: IndiProperty);
end;

procedure Tpop_indi.NewNumber(nvp: INumberVectorProperty);
var ok: boolean;
begin
// Memomsg.Lines.Add('NewNumber: '+nvp.name+' '+FloatToStr(nvp.np[0].value));
if nvp = coord_prop then
begin
pos_x.Text := artostr(coord_ra.Value);
pos_y.Text := detostr(coord_dec.Value);
if nvp.s=IPS_ALERT then begin
Memomsg.Lines.Add('Error from telescope: coordinates alert.');
ScopeDisconnect(ok);
end
else begin
pos_x.Text := artostr(coord_ra.Value);
pos_y.Text := detostr(coord_dec.Value);
end;
end;
end;

Expand Down

0 comments on commit 912d39e

Please sign in to comment.