Skip to content

Commit

Permalink
implement LX200_10MICRON::SetTrackEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
d33psky committed Sep 30, 2023
1 parent c7659ce commit a22b0a4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
33 changes: 31 additions & 2 deletions drivers/telescope/lx200_10micron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
GM1000HPS GM2000QCI GM2000HPS GM3000HPS GM4000QCI GM4000HPS AZ2000
Mount Command Protocol 2.14.11
Copyright (C) 2017-2020 Hans Lambermont
Copyright (C) 2017-2023 Hans Lambermont
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -78,7 +78,7 @@ LX200_10MICRON::LX200_10MICRON() : LX200Generic()
4
);

setVersion(1, 1);
setVersion(1, 2); // don't forget to update drivers.xml
}

// Called by INDI::DefaultDevice::ISGetProperties
Expand Down Expand Up @@ -572,6 +572,35 @@ bool LX200_10MICRON::UnPark()
return true;
}

bool LX200_10MICRON::SetTrackEnabled(bool enabled)
{
// :AL#
// Stops tracking.
// Returns: nothing
// :AP#
// Starts tracking.
// Returns: nothing
if (enabled)
{
LOG_INFO("Start tracking.");
if (setStandardProcedureWithoutRead(fd, "#:AP#") < 0)
{
LOG_ERROR("Start tracking command failed");
return false;
}
}
else
{
LOG_INFO("Stop tracking.");
if (setStandardProcedureWithoutRead(fd, "#:AL#") < 0)
{
LOG_ERROR("Stop tracking command failed");
return false;
}
}
return true;
}

bool LX200_10MICRON::getUnattendedFlipSetting()
{
// #:Guaf#
Expand Down
1 change: 1 addition & 0 deletions drivers/telescope/lx200_10micron.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class LX200_10MICRON : public LX200Generic
bool ReadScopeStatus() override;
bool Park() override;
bool UnPark() override;
bool SetTrackEnabled(bool enabled) override;
bool flip();
bool getUnattendedFlipSetting();
bool setUnattendedFlipSetting(bool setting);
Expand Down

0 comments on commit a22b0a4

Please sign in to comment.