Instrument Neutral Distributed Interface INDI  2.0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
SkywatcherAPI Class Reference

#include <skywatcherAPI.h>

Inheritance diagram for SkywatcherAPI:
SkywatcherAPIMount SkywatcherAltAzSimple

Classes

struct  SkyWatcherFeatures
 

Public Types

enum  AXISID { AXIS1 = 0 , AXIS2 = 1 }
 
enum  SkywatcherCommand {
  Initialize = 'F' , InquireMotorBoardVersion = 'e' , InquireGridPerRevolution = 'a' , InquireTimerInterruptFreq = 'b' ,
  InquireHighSpeedRatio = 'g' , InquirePECPeriod = 's' , InstantAxisStop = 'L' , NotInstantAxisStop = 'K' ,
  SetAxisPositionCmd = 'E' , GetAxisPosition = 'j' , GetAxisStatus = 'f' , SetSnapPort = 'O' ,
  SetMotionMode = 'G' , SetGotoTargetIncrement = 'H' , SetBreakPointIncrement = 'M' , SetGotoTarget = 'S' ,
  SetBreakStep = 'U' , SetStepPeriod = 'I' , StartMotion = 'J' , GetStepPeriod = 'D' ,
  ActivateMotor = 'B' , SetST4GuideRateCmd = 'P' , GetHomePosition = 'd' , SetFeatureCmd = 'W' ,
  GetFeatureCmd = 'q' , InquireAuxEncoder = 'd' , SetPolarScopeLED = 'V'
}
 
enum  SkywatcherGetFeatureCmd { GET_INDEXER_CMD = 0x00 , GET_FEATURES_CMD = 0x01 }
 
enum  SkywatcherSetFeatureCmd {
  START_PPEC_TRAINING_CMD = 0x00 , STOP_PPEC_TRAINING_CMD = 0x01 , TURN_PPEC_ON_CMD = 0x02 , TURN_PPEC_OFF_CMD = 0X03 ,
  ENCODER_ON_CMD = 0x04 , ENCODER_OFF_CMD = 0x05 , DISABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0006 , ENABLE_FULL_CURRENT_LOW_SPEED_CMD = 0x0106 ,
  RESET_HOME_INDEXER_CMD = 0x08
}
 
enum  PositiveRotationSense_t { CLOCKWISE , ANTICLOCKWISE }
 
enum  MountType {
  EQ6 = 0x00 , HEQ5 = 0x01 , EQ5 = 0x02 , EQ3 = 0x03 ,
  EQ8 = 0x04 , AZEQ6 = 0x05 , AZEQ5 = 0x06 , STAR_ADVENTURER = 0x0A ,
  EQ8R_PRO = 0x20 , AZEQ6_PRO = 0x22 , EQ6_PRO = 0x23 , EQ5_PRO = 0x31 ,
  GT = 0x80 , MF = 0x81 , _114GT = 0x82 , DOB = 0x90 ,
  AZGTE = 0xA2 , AZGTI = 0xA5
}
 
typedef struct SkywatcherAPI::SkyWatcherFeatures SkyWatcherFeatures
 

Public Member Functions

 SkywatcherAPI ()
 
virtual ~SkywatcherAPI ()=default
 
unsigned long BCDstr2long (std::string &String)
 
unsigned long Highstr2long (std::string &String)
 
bool CheckIfDCMotor ()
 
bool IsMerlinMount () const
 Check if the current mount is a Virtuoso (AltAz) More...
 
long DegreesPerSecondToClocksTicksPerMicrostep (AXISID Axis, double DegreesPerSecond)
 Check if the current mount is AZ GTi. More...
 
long DegreesToMicrosteps (AXISID Axis, double AngleInDegrees)
 Convert angle in degrees to microsteps. More...
 
bool GetEncoder (AXISID Axis)
 Set the CurrentEncoders status variable to the current encoder value in microsteps for the specified axis. More...
 
bool GetHighSpeedRatio (AXISID Axis)
 Set the HighSpeedRatio status variable to the ratio between high and low speed stepping modes. More...
 
bool GetMicrostepsPerRevolution (AXISID Axis)
 Set the MicrostepsPerRevolution status variable to the number of microsteps for a 360 degree revolution of the axis. More...
 
bool GetMicrostepsPerWormRevolution (AXISID Axis)
 Set the MicrostepsPermWormRevolution status variable to the number of microsteps for a 360 degree revolution of the worm gear. More...
 
bool GetMotorBoardVersion (AXISID Axis)
 
PositiveRotationSense_t GetPositiveRotationDirection (AXISID Axis)
 Returns the rotation direction for a positive step on the designated axis. More...
 
bool GetStatus (AXISID Axis)
 
bool GetStepperClockFrequency (AXISID Axis)
 Set the StepperClockFrequency status variable to fixed PIC timer interrupt frequency (ticks per second). More...
 
bool InquireFeatures ()
 
bool InitializeMC ()
 
bool InitMount ()
 Initialize the communication to the mount. More...
 
bool HasHomeIndexers ()
 
bool HasAuxEncoders ()
 
bool HasPPEC ()
 
bool HasSnapPort1 ()
 
bool HasSnapPort2 ()
 
bool HasPolarLed ()
 
void TurnEncoder (AXISID axis, bool on)
 
void TurnRAEncoder (bool on)
 
void TurnDEEncoder (bool on)
 
void SetFeature (AXISID axis, uint32_t command)
 
bool InstantStop (AXISID Axis)
 Bring the axis to an immediate halt. N.B. This command could cause damage to the mount or telescope and should not normally be used except for emergency stops. More...
 
void Long2BCDstr (long Number, std::string &String)
 
double MicrostepsToDegrees (AXISID Axis, long Microsteps)
 Convert microsteps to angle in degrees. More...
 
double MicrostepsToRadians (AXISID Axis, long Microsteps)
 Convert microsteps to angle in radians. More...
 
void PrepareForSlewing (AXISID Axis, double Speed)
 
long RadiansPerSecondToClocksTicksPerMicrostep (AXISID Axis, double RadiansPerSecond)
 Convert a slewing rate in radians per second into the required clock ticks per microstep setting. More...
 
long RadiansToMicrosteps (AXISID Axis, double AngleInRadians)
 Convert angle in radians to microsteps. More...
 
bool SetEncoder (AXISID Axis, long Microsteps)
 Set axis encoder to the specified value. More...
 
bool SetGotoTargetOffset (AXISID Axis, long OffsetInMicrosteps)
 Set the goto target offset per the specified axis. More...
 
bool SetAxisMotionMode (AXISID Axis, char Func, char Direction)
 Set the motion mode per the specified axis. More...
 
void SetSerialPort (int port)
 Set the serail port to be usb for mount communication. More...
 
bool SetClockTicksPerMicrostep (AXISID Axis, long ClockTicksPerMicrostep)
 Set the PIC internal divider variable which determines how many clock interrupts have to occur between each microstep. More...
 
bool SetSlewModeDeccelerationRampLength (AXISID Axis, long Microsteps)
 Set the length of the deccelaration ramp for Slew mode. More...
 
bool SetSlewToModeDeccelerationRampLength (AXISID Axis, long Microsteps)
 Set the length of the deccelaration ramp for SlewTo mode. More...
 
bool toggleSnapPort (bool enabled)
 Toggle the snap port on or off. More...
 
void Slew (AXISID Axis, double SpeedInRadiansPerSecond, bool IgnoreSilentMode=true)
 Start the axis slewing at the given rate. More...
 
void SlewTo (AXISID Axis, long OffsetInMicrosteps, bool verbose=true)
 Slew to the given offset and stop. More...
 
bool SlowStop (AXISID Axis)
 Bring the axis to slow stop in the distance specified by SetSlewModeDeccelerationRampLength. More...
 
bool StartAxisMotion (AXISID Axis)
 Start the axis slewing in the prevously selected mode. More...
 
bool TalkWithAxis (AXISID Axis, SkywatcherCommand Command, std::string &cmdDataStr, std::string &responseStr)
 
bool IsInMotion (AXISID Axis)
 Check if an axis is moving. More...
 

Static Public Member Functions

static const char * mountTypeToString (uint8_t type)
 

Public Attributes

unsigned long MCVersion { 0 }
 
unsigned long MountCode { 0 }
 
bool IsDCMotor { false }
 
bool SilentSlewMode { true }
 
long MicrostepsPerRevolution [2]
 
long StepperClockFrequency [2]
 
long HighSpeedRatio [2]
 
long MicrostepsPerWormRevolution [2]
 
SkyWatcherFeatures AxisFeatures [2]
 
double RadiansPerMicrostep [2]
 
double MicrostepsPerRadian [2]
 
double DegreesPerMicrostep [2]
 
double MicrostepsPerDegree [2]
 
long LowSpeedGotoMargin [2]
 
long LastSlewToTarget [2]
 
long CurrentEncoders [2]
 Current encoder values (microsteps). More...
 
long PolarisPositionEncoders [2]
 Polaris position (initial) encoder values (microsteps). More...
 
long ZeroPositionEncoders [2]
 Zero position encoder values (microsteps). More...
 
AXISSTATUS AxesStatus [2]
 
double SlewingSpeed [2]
 
INDI::TelescopepChildTelescope { nullptr }
 

Static Public Attributes

static constexpr double SIDEREALRATE { (2 * M_PI / 86164.09065) }
 
static constexpr double MAX_SPEED { 500.0 }
 
static constexpr double LOW_SPEED_MARGIN { 128.0 * SIDEREALRATE }
 

Protected Attributes

unsigned int DBG_SCOPE { 0 }
 

Detailed Description

Definition at line 53 of file skywatcherAPI.h.

Member Typedef Documentation

◆ SkyWatcherFeatures

Member Enumeration Documentation

◆ AXISID

Enumerator
AXIS1 
AXIS2 

Definition at line 56 of file skywatcherAPI.h.

◆ MountType

Enumerator
EQ6 
HEQ5 
EQ5 
EQ3 
EQ8 
AZEQ6 
AZEQ5 
STAR_ADVENTURER 
EQ8R_PRO 
AZEQ6_PRO 
EQ6_PRO 
EQ5_PRO 
GT 
MF 
_114GT 
DOB 
AZGTE 
AZGTI 

Definition at line 338 of file skywatcherAPI.h.

◆ PositiveRotationSense_t

Enumerator
CLOCKWISE 
ANTICLOCKWISE 

Definition at line 174 of file skywatcherAPI.h.

◆ SkywatcherCommand

Enumerator
Initialize 
InquireMotorBoardVersion 
InquireGridPerRevolution 
InquireTimerInterruptFreq 
InquireHighSpeedRatio 
InquirePECPeriod 
InstantAxisStop 
NotInstantAxisStop 
SetAxisPositionCmd 
GetAxisPosition 
GetAxisStatus 
SetSnapPort 
SetMotionMode 
SetGotoTargetIncrement 
SetBreakPointIncrement 
SetGotoTarget 
SetBreakStep 
SetStepPeriod 
StartMotion 
GetStepPeriod 
ActivateMotor 
SetST4GuideRateCmd 
GetHomePosition 
SetFeatureCmd 
GetFeatureCmd 
InquireAuxEncoder 
SetPolarScopeLED 

Definition at line 63 of file skywatcherAPI.h.

◆ SkywatcherGetFeatureCmd

Enumerator
GET_INDEXER_CMD 
GET_FEATURES_CMD 

Definition at line 94 of file skywatcherAPI.h.

◆ SkywatcherSetFeatureCmd

Enumerator
START_PPEC_TRAINING_CMD 
STOP_PPEC_TRAINING_CMD 
TURN_PPEC_ON_CMD 
TURN_PPEC_OFF_CMD 
ENCODER_ON_CMD 
ENCODER_OFF_CMD 
DISABLE_FULL_CURRENT_LOW_SPEED_CMD 
ENABLE_FULL_CURRENT_LOW_SPEED_CMD 
RESET_HOME_INDEXER_CMD 

Definition at line 100 of file skywatcherAPI.h.

Constructor & Destructor Documentation

◆ SkywatcherAPI()

SkywatcherAPI::SkywatcherAPI ( )

Definition at line 112 of file skywatcherAPI.cpp.

◆ ~SkywatcherAPI()

virtual SkywatcherAPI::~SkywatcherAPI ( )
virtualdefault

Member Function Documentation

◆ BCDstr2long()

unsigned long SkywatcherAPI::BCDstr2long ( std::string &  String)

Definition at line 127 of file skywatcherAPI.cpp.

◆ CheckIfDCMotor()

bool SkywatcherAPI::CheckIfDCMotor ( )

Definition at line 173 of file skywatcherAPI.cpp.

◆ DegreesPerSecondToClocksTicksPerMicrostep()

long SkywatcherAPI::DegreesPerSecondToClocksTicksPerMicrostep ( AXISID  Axis,
double  DegreesPerSecond 
)

Check if the current mount is AZ GTi.

Returns
True if the current mount is AZ GTi otherwise false.

Convert a slewing rate in degrees per second into the required clock ticks per microstep setting.

Parameters
[in]Axis- The axis to use.
[in]DegreesPerSecond- Slewing rate in degrees per second
Returns
Clock ticks per microstep for the requested rate

Definition at line 214 of file skywatcherAPI.cpp.

◆ DegreesToMicrosteps()

long SkywatcherAPI::DegreesToMicrosteps ( AXISID  Axis,
double  AngleInDegrees 
)

Convert angle in degrees to microsteps.

Parameters
[in]Axis- The axis to use.
[in]AngleInRadians- the angle in degrees.
Returns
the number of microsteps

Definition at line 221 of file skywatcherAPI.cpp.

◆ GetEncoder()

bool SkywatcherAPI::GetEncoder ( AXISID  Axis)

Set the CurrentEncoders status variable to the current encoder value in microsteps for the specified axis.

Returns
false failure

Definition at line 226 of file skywatcherAPI.cpp.

◆ GetHighSpeedRatio()

bool SkywatcherAPI::GetHighSpeedRatio ( AXISID  Axis)

Set the HighSpeedRatio status variable to the ratio between high and low speed stepping modes.

Definition at line 240 of file skywatcherAPI.cpp.

◆ GetMicrostepsPerRevolution()

bool SkywatcherAPI::GetMicrostepsPerRevolution ( AXISID  Axis)

Set the MicrostepsPerRevolution status variable to the number of microsteps for a 360 degree revolution of the axis.

Parameters
[in]Axis- The axis to use.
Returns
false failure

Definition at line 261 of file skywatcherAPI.cpp.

◆ GetMicrostepsPerWormRevolution()

bool SkywatcherAPI::GetMicrostepsPerWormRevolution ( AXISID  Axis)

Set the MicrostepsPermWormRevolution status variable to the number of microsteps for a 360 degree revolution of the worm gear.

Parameters
[in]Axis- The axis to use.
Returns
false failure

Definition at line 296 of file skywatcherAPI.cpp.

◆ GetMotorBoardVersion()

bool SkywatcherAPI::GetMotorBoardVersion ( AXISID  Axis)

Definition at line 313 of file skywatcherAPI.cpp.

◆ GetPositiveRotationDirection()

SkywatcherAPI::PositiveRotationSense_t SkywatcherAPI::GetPositiveRotationDirection ( AXISID  Axis)

Returns the rotation direction for a positive step on the designated axis.

Parameters
[in]Axis- The axis to use.
Returns
The rotation sense clockwise or anticlockwise.

Rotation directions are given looking down the axis towards the motorised pier for an altitude or declination axis. Or down the pier towards the mount base for an azimuth or right ascension axis

Definition at line 330 of file skywatcherAPI.cpp.

◆ GetStatus()

bool SkywatcherAPI::GetStatus ( AXISID  Axis)

Definition at line 361 of file skywatcherAPI.cpp.

◆ GetStepperClockFrequency()

bool SkywatcherAPI::GetStepperClockFrequency ( AXISID  Axis)

Set the StepperClockFrequency status variable to fixed PIC timer interrupt frequency (ticks per second).

Returns
false failure

Definition at line 339 of file skywatcherAPI.cpp.

◆ HasAuxEncoders()

bool SkywatcherAPI::HasAuxEncoders ( )

Definition at line 986 of file skywatcherAPI.cpp.

◆ HasHomeIndexers()

bool SkywatcherAPI::HasHomeIndexers ( )

Definition at line 981 of file skywatcherAPI.cpp.

◆ HasPolarLed()

bool SkywatcherAPI::HasPolarLed ( )

Definition at line 1007 of file skywatcherAPI.cpp.

◆ HasPPEC()

bool SkywatcherAPI::HasPPEC ( )

Definition at line 991 of file skywatcherAPI.cpp.

◆ HasSnapPort1()

bool SkywatcherAPI::HasSnapPort1 ( )

Definition at line 996 of file skywatcherAPI.cpp.

◆ HasSnapPort2()

bool SkywatcherAPI::HasSnapPort2 ( )

Definition at line 1002 of file skywatcherAPI.cpp.

◆ Highstr2long()

unsigned long SkywatcherAPI::Highstr2long ( std::string &  String)

Definition at line 154 of file skywatcherAPI.cpp.

◆ InitializeMC()

bool SkywatcherAPI::InitializeMC ( )

Definition at line 423 of file skywatcherAPI.cpp.

◆ InitMount()

bool SkywatcherAPI::InitMount ( )

Initialize the communication to the mount.

Returns
True if successful otherwise false

Definition at line 493 of file skywatcherAPI.cpp.

◆ InquireFeatures()

bool SkywatcherAPI::InquireFeatures ( )

Definition at line 435 of file skywatcherAPI.cpp.

◆ InstantStop()

bool SkywatcherAPI::InstantStop ( AXISID  Axis)

Bring the axis to an immediate halt. N.B. This command could cause damage to the mount or telescope and should not normally be used except for emergency stops.

Parameters
[in]Axis- The axis to use.
Returns
false failure

Definition at line 582 of file skywatcherAPI.cpp.

◆ IsInMotion()

bool SkywatcherAPI::IsInMotion ( AXISID  Axis)

Check if an axis is moving.

Parameters
[in]Axis- The axis to check.
Returns
True if the axis is moving otherwise false.

Definition at line 974 of file skywatcherAPI.cpp.

◆ IsMerlinMount()

bool SkywatcherAPI::IsMerlinMount ( ) const

Check if the current mount is a Virtuoso (AltAz)

Returns
True if the current mount is Virtuoso otherwise false.

Check if the current mount is a Merlin (AltAz)

Returns
True if the current mount is Merlin otherwise false.

Definition at line 209 of file skywatcherAPI.cpp.

◆ Long2BCDstr()

void SkywatcherAPI::Long2BCDstr ( long  Number,
std::string &  String 
)

Definition at line 593 of file skywatcherAPI.cpp.

◆ MicrostepsToDegrees()

double SkywatcherAPI::MicrostepsToDegrees ( AXISID  Axis,
long  Microsteps 
)

Convert microsteps to angle in degrees.

Parameters
[in]Axis- The axis to use.
[in]Microsteps
Returns
the angle in degrees

Definition at line 601 of file skywatcherAPI.cpp.

◆ MicrostepsToRadians()

double SkywatcherAPI::MicrostepsToRadians ( AXISID  Axis,
long  Microsteps 
)

Convert microsteps to angle in radians.

Parameters
[in]Axis- The axis to use.
[in]Microsteps
Returns
the angle in radians

Definition at line 606 of file skywatcherAPI.cpp.

◆ mountTypeToString()

const char * SkywatcherAPI::mountTypeToString ( uint8_t  type)
static

Definition at line 67 of file skywatcherAPI.cpp.

◆ PrepareForSlewing()

void SkywatcherAPI::PrepareForSlewing ( AXISID  Axis,
double  Speed 
)

Definition at line 611 of file skywatcherAPI.cpp.

◆ RadiansPerSecondToClocksTicksPerMicrostep()

long SkywatcherAPI::RadiansPerSecondToClocksTicksPerMicrostep ( AXISID  Axis,
double  RadiansPerSecond 
)

Convert a slewing rate in radians per second into the required clock ticks per microstep setting.

Parameters
[in]Axis- The axis to use.
[in]DegreesPerSecond- Slewing rate in degrees per second
Returns
Clock ticks per microstep for the requested rate

Definition at line 660 of file skywatcherAPI.cpp.

◆ RadiansToMicrosteps()

long SkywatcherAPI::RadiansToMicrosteps ( AXISID  Axis,
double  AngleInRadians 
)

Convert angle in radians to microsteps.

Parameters
[in]Axis- The axis to use.
[in]AngleInRadians- the angle in radians.
Returns
the number of microsteps

Definition at line 667 of file skywatcherAPI.cpp.

◆ SetAxisMotionMode()

bool SkywatcherAPI::SetAxisMotionMode ( AXISID  Axis,
char  Func,
char  Direction 
)

Set the motion mode per the specified axis.

Parameters
[in]Axis- The axis to use.
[in]Func- the slewing mode
  • 0 = High speed SlewTo mode
  • 1 = Low speed Slew mode
  • 2 = Low speed SlewTo mode
  • 3 = High Speed Slew mode
[in]Direction- the direction to slew in
  • 0 = Forward
  • 1 = Reverse
Returns
false failure

Func - 0 High speed slew to mode (goto) Func - 1 Low speed slew mode Func - 2 Low speed slew to mode (goto) Func - 3 High speed slew mode

Definition at line 696 of file skywatcherAPI.cpp.

◆ SetClockTicksPerMicrostep()

bool SkywatcherAPI::SetClockTicksPerMicrostep ( AXISID  Axis,
long  ClockTicksPerMicrostep 
)

Set the PIC internal divider variable which determines how many clock interrupts have to occur between each microstep.

Definition at line 707 of file skywatcherAPI.cpp.

◆ SetEncoder()

bool SkywatcherAPI::SetEncoder ( AXISID  Axis,
long  Microsteps 
)

Set axis encoder to the specified value.

Parameters
[in]Axis- The axis to use.
[in]Microsteps- the value in microsteps.
Returns
false failure

Definition at line 672 of file skywatcherAPI.cpp.

◆ SetFeature()

void SkywatcherAPI::SetFeature ( AXISID  axis,
uint32_t  command 
)

Definition at line 1032 of file skywatcherAPI.cpp.

◆ SetGotoTargetOffset()

bool SkywatcherAPI::SetGotoTargetOffset ( AXISID  Axis,
long  OffsetInMicrosteps 
)

Set the goto target offset per the specified axis.

Parameters
[in]Axis- The axis to use.
[in]OffsetInMicrosteps- the value to use
Returns
false failure

Definition at line 682 of file skywatcherAPI.cpp.

◆ SetSerialPort()

void SkywatcherAPI::SetSerialPort ( int  port)
inline

Set the serail port to be usb for mount communication.

Parameters
[in]port- an open file descriptor for the port to use.

Definition at line 277 of file skywatcherAPI.h.

◆ SetSlewModeDeccelerationRampLength()

bool SkywatcherAPI::SetSlewModeDeccelerationRampLength ( AXISID  Axis,
long  Microsteps 
)

Set the length of the deccelaration ramp for Slew mode.

Parameters
[in]Axis- The axis to use.
[in]Microsteps- the length of the decceleration ramp in microsteps.
Returns
false failure

Definition at line 717 of file skywatcherAPI.cpp.

◆ SetSlewToModeDeccelerationRampLength()

bool SkywatcherAPI::SetSlewToModeDeccelerationRampLength ( AXISID  Axis,
long  Microsteps 
)

Set the length of the deccelaration ramp for SlewTo mode.

Parameters
[in]Axis- The axis to use.
[in]Microsteps- the length of the decceleration ramp in microsteps.
Returns
false failure

Definition at line 727 of file skywatcherAPI.cpp.

◆ Slew()

void SkywatcherAPI::Slew ( AXISID  Axis,
double  SpeedInRadiansPerSecond,
bool  IgnoreSilentMode = true 
)

Start the axis slewing at the given rate.

Parameters
[in]Axis- The axis to use.
[in]SpeedInRadiansPerSecond- the slewing speed
[in]IgnoreSilentMode- ignore the silent mode even if set

Definition at line 744 of file skywatcherAPI.cpp.

◆ SlewTo()

void SkywatcherAPI::SlewTo ( AXISID  Axis,
long  OffsetInMicrosteps,
bool  verbose = true 
)

Slew to the given offset and stop.

Parameters
[in]Axis- The axis to use.
[in]OffsetInMicrosteps- The number of microsteps to
[in]verbose- Verbose mode slew from the current axis position.

Definition at line 793 of file skywatcherAPI.cpp.

◆ SlowStop()

bool SkywatcherAPI::SlowStop ( AXISID  Axis)

Bring the axis to slow stop in the distance specified by SetSlewModeDeccelerationRampLength.

Parameters
[in]Axis- The axis to use.
Returns
false failure

Definition at line 864 of file skywatcherAPI.cpp.

◆ StartAxisMotion()

bool SkywatcherAPI::StartAxisMotion ( AXISID  Axis)

Start the axis slewing in the prevously selected mode.

Parameters
[in]Axis- The axis to use.
Returns
false failure

Definition at line 872 of file skywatcherAPI.cpp.

◆ TalkWithAxis()

bool SkywatcherAPI::TalkWithAxis ( AXISID  Axis,
SkywatcherCommand  Command,
std::string &  cmdDataStr,
std::string &  responseStr 
)

Definition at line 879 of file skywatcherAPI.cpp.

◆ toggleSnapPort()

bool SkywatcherAPI::toggleSnapPort ( bool  enabled)

Toggle the snap port on or off.

Parameters
[in]enabled- the state requested.

Definition at line 737 of file skywatcherAPI.cpp.

◆ TurnDEEncoder()

void SkywatcherAPI::TurnDEEncoder ( bool  on)

Definition at line 1027 of file skywatcherAPI.cpp.

◆ TurnEncoder()

void SkywatcherAPI::TurnEncoder ( AXISID  axis,
bool  on 
)

Definition at line 1012 of file skywatcherAPI.cpp.

◆ TurnRAEncoder()

void SkywatcherAPI::TurnRAEncoder ( bool  on)

Definition at line 1022 of file skywatcherAPI.cpp.

Member Data Documentation

◆ AxesStatus

AXISSTATUS SkywatcherAPI::AxesStatus[2]

Definition at line 403 of file skywatcherAPI.h.

◆ AxisFeatures

SkyWatcherFeatures SkywatcherAPI::AxisFeatures[2]

Definition at line 384 of file skywatcherAPI.h.

◆ CurrentEncoders

long SkywatcherAPI::CurrentEncoders[2]

Current encoder values (microsteps).

Definition at line 397 of file skywatcherAPI.h.

◆ DBG_SCOPE

unsigned int SkywatcherAPI::DBG_SCOPE { 0 }
protected

Definition at line 408 of file skywatcherAPI.h.

◆ DegreesPerMicrostep

double SkywatcherAPI::DegreesPerMicrostep[2]

Definition at line 389 of file skywatcherAPI.h.

◆ HighSpeedRatio

long SkywatcherAPI::HighSpeedRatio[2]

Definition at line 382 of file skywatcherAPI.h.

◆ IsDCMotor

bool SkywatcherAPI::IsDCMotor { false }

Definition at line 376 of file skywatcherAPI.h.

◆ LastSlewToTarget

long SkywatcherAPI::LastSlewToTarget[2]

Definition at line 394 of file skywatcherAPI.h.

◆ LOW_SPEED_MARGIN

constexpr double SkywatcherAPI::LOW_SPEED_MARGIN { 128.0 * SIDEREALRATE }
staticconstexpr

Definition at line 117 of file skywatcherAPI.h.

◆ LowSpeedGotoMargin

long SkywatcherAPI::LowSpeedGotoMargin[2]

Definition at line 391 of file skywatcherAPI.h.

◆ MAX_SPEED

constexpr double SkywatcherAPI::MAX_SPEED { 500.0 }
staticconstexpr

Definition at line 116 of file skywatcherAPI.h.

◆ MCVersion

unsigned long SkywatcherAPI::MCVersion { 0 }

Definition at line 334 of file skywatcherAPI.h.

◆ MicrostepsPerDegree

double SkywatcherAPI::MicrostepsPerDegree[2]

Definition at line 390 of file skywatcherAPI.h.

◆ MicrostepsPerRadian

double SkywatcherAPI::MicrostepsPerRadian[2]

Definition at line 388 of file skywatcherAPI.h.

◆ MicrostepsPerRevolution

long SkywatcherAPI::MicrostepsPerRevolution[2]

Definition at line 380 of file skywatcherAPI.h.

◆ MicrostepsPerWormRevolution

long SkywatcherAPI::MicrostepsPerWormRevolution[2]

Definition at line 383 of file skywatcherAPI.h.

◆ MountCode

unsigned long SkywatcherAPI::MountCode { 0 }

Definition at line 375 of file skywatcherAPI.h.

◆ pChildTelescope

INDI::Telescope* SkywatcherAPI::pChildTelescope { nullptr }

Definition at line 421 of file skywatcherAPI.h.

◆ PolarisPositionEncoders

long SkywatcherAPI::PolarisPositionEncoders[2]

Polaris position (initial) encoder values (microsteps).

Definition at line 399 of file skywatcherAPI.h.

◆ RadiansPerMicrostep

double SkywatcherAPI::RadiansPerMicrostep[2]

Definition at line 387 of file skywatcherAPI.h.

◆ SIDEREALRATE

constexpr double SkywatcherAPI::SIDEREALRATE { (2 * M_PI / 86164.09065) }
staticconstexpr

Definition at line 115 of file skywatcherAPI.h.

◆ SilentSlewMode

bool SkywatcherAPI::SilentSlewMode { true }

Definition at line 377 of file skywatcherAPI.h.

◆ SlewingSpeed

double SkywatcherAPI::SlewingSpeed[2]

Definition at line 404 of file skywatcherAPI.h.

◆ StepperClockFrequency

long SkywatcherAPI::StepperClockFrequency[2]

Definition at line 381 of file skywatcherAPI.h.

◆ ZeroPositionEncoders

long SkywatcherAPI::ZeroPositionEncoders[2]

Zero position encoder values (microsteps).

Definition at line 401 of file skywatcherAPI.h.


The documentation for this class was generated from the following files: