Skip to content

Commit

Permalink
defaultspeed was not even used. Now max speed is correctly set
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Jul 25, 2021
1 parent 9124d82 commit e71b364
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions indi-eqmod/eqmodbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ using namespace INDI::AlignmentSubsystem;
/* Preset Slew Speeds */
#define SLEWMODES 11
double slewspeeds[SLEWMODES - 1] = { 1.0, 2.0, 4.0, 8.0, 32.0, 64.0, 128.0, 600.0, 700.0, 800.0 };
double defaultspeed = 800.0;

#define RA_AXIS 0
#define DEC_AXIS 1
Expand Down Expand Up @@ -270,13 +269,15 @@ bool EQMod::initProperties()

for (int i = 0; i < SlewRateSP.nsp - 1; i++)
{
SlewRateSP.sp[i].s = ISS_OFF;
sprintf(SlewRateSP.sp[i].label, "%.fx", slewspeeds[i]);
SlewRateSP.sp[i].aux = (void *)&slewspeeds[i];
}

// Since last item is NOT maximum (but custom), let's set item before custom to SLEWMAX
SlewRateSP.sp[SlewRateSP.nsp - 2].s = ISS_ON;
strncpy(SlewRateSP.sp[SlewRateSP.nsp - 2].name, "SLEW_MAX", MAXINDINAME);

// Last is custom
strncpy(SlewRateSP.sp[SlewRateSP.nsp - 1].name, "SLEWCUSTOM", MAXINDINAME);
strncpy(SlewRateSP.sp[SlewRateSP.nsp - 1].label, "Custom", MAXINDILABEL);

Expand Down

0 comments on commit e71b364

Please sign in to comment.