Skip to content

Commit

Permalink
fix slew rate
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-soja committed Jan 19, 2025
1 parent e135052 commit 69804ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/telescope/lx200am5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ bool LX200AM5::initProperties()

// Slew Rates

SlewRateSP[0].setLabel("0.25x");
SlewRateSP[0].setLabel("0.5x");
SlewRateSP[1].setLabel("1x");
SlewRateSP[2].setLabel("2x");
SlewRateSP[3].setLabel("4x");
Expand All @@ -94,7 +94,7 @@ bool LX200AM5::initProperties()
SlewRateSP[8].setLabel("1440x");
SlewRateSP.reset();
// 1440x is the default
SlewRateSP[9].setState(ISS_ON);
SlewRateSP[8].setState(ISS_ON);

// Home/Zero position
// HomeSP[0].fill("GO", "Go", ISS_OFF);
Expand Down Expand Up @@ -373,7 +373,7 @@ bool LX200AM5::getMountType()
bool LX200AM5::SetSlewRate(int index)
{
char command[DRIVER_LEN] = {0};
snprintf(command, DRIVER_LEN, ":R%d#", index);
snprintf(command, DRIVER_LEN, ":R%d#", index + 1);
return sendCommand(command);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/telescope/lx200am5.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,6 @@ class LX200AM5 : public LX200Generic
// Maximum buffer for sending/receiving.
static constexpr const uint8_t DRIVER_LEN {64};
// Slew Modes
static constexpr const uint8_t SLEW_MODES {10};
static constexpr const uint8_t SLEW_MODES {9};
static constexpr const char * MERIDIAN_FLIP_TAB {"Meridian Flip"};
};

0 comments on commit 69804ee

Please sign in to comment.