Skip to content

Commit

Permalink
Merge branch 'indilib:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
hcomet authored Nov 2, 2024
2 parents cb93492 + 12d6291 commit 7e4dcba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
3 changes: 3 additions & 0 deletions drivers/telescope/telescope_simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ bool ScopeSim::MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command)
return false;
}
mcRate = static_cast<int>(SlewRateSP.findOnSwitchIndex()) + 1;
mcRate = std::max(1,std::min(4,mcRate));

int rate = (dir == INDI_DIR_NS::DIRECTION_NORTH) ? mcRate : -mcRate;
LOGF_DEBUG("MoveNS dir %s, motion %s, rate %d", dir == DIRECTION_NORTH ? "N" : "S", command == 0 ? "start" : "stop", rate);
Expand All @@ -510,6 +511,8 @@ bool ScopeSim::MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command)
}

mcRate = static_cast<int>(SlewRateSP.findOnSwitchIndex()) + 1;
mcRate = std::max(1,std::min(4,mcRate));

int rate = (dir == INDI_DIR_WE::DIRECTION_EAST) ? -mcRate : mcRate;
LOGF_DEBUG("MoveWE dir %d, motion %s, rate %d", dir == DIRECTION_EAST ? "E" : "W", command == 0 ? "start" : "stop", rate);

Expand Down
23 changes: 5 additions & 18 deletions libs/indibase/indiccd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,24 +475,11 @@ bool CCD::initProperties()
/**********************************************/

// Snooped Devices

// Load from config
char telescope[MAXINDIDEVICE] = {"Telescope Simulator"};
IUGetConfigText(getDeviceName(), "ACTIVE_DEVICES", "ACTIVE_TELESCOPE", telescope, MAXINDIDEVICE);
char rotator[MAXINDIDEVICE] = {"Rotator Simulator"};
IUGetConfigText(getDeviceName(), "ACTIVE_DEVICES", "ACTIVE_ROTATOR", rotator, MAXINDIDEVICE);
char focuser[MAXINDIDEVICE] = {"Focuser Simulator"};
IUGetConfigText(getDeviceName(), "ACTIVE_DEVICES", "ACTIVE_FOCUSER", focuser, MAXINDIDEVICE);
char filter[MAXINDIDEVICE] = {"CCD Simulator"};
IUGetConfigText(getDeviceName(), "ACTIVE_DEVICES", "ACTIVE_FILTER", filter, MAXINDIDEVICE);
char skyquality[MAXINDIDEVICE] = {"SQM"};
IUGetConfigText(getDeviceName(), "ACTIVE_DEVICES", "ACTIVE_SKYQUALITY", skyquality, MAXINDIDEVICE);

ActiveDeviceTP[ACTIVE_TELESCOPE].fill("ACTIVE_TELESCOPE", "Telescope", telescope);
ActiveDeviceTP[ACTIVE_ROTATOR].fill("ACTIVE_ROTATOR", "Rotator", rotator);
ActiveDeviceTP[ACTIVE_FOCUSER].fill("ACTIVE_FOCUSER", "Focuser", focuser);
ActiveDeviceTP[ACTIVE_FILTER].fill("ACTIVE_FILTER", "Filter", filter);
ActiveDeviceTP[ACTIVE_SKYQUALITY].fill("ACTIVE_SKYQUALITY", "Sky Quality", skyquality);
ActiveDeviceTP[ACTIVE_TELESCOPE].fill("ACTIVE_TELESCOPE", "Telescope", "Telescope Simulator");
ActiveDeviceTP[ACTIVE_ROTATOR].fill("ACTIVE_ROTATOR", "Rotator", "Rotator Simulator");
ActiveDeviceTP[ACTIVE_FOCUSER].fill("ACTIVE_FOCUSER", "Focuser", "Focuser Simulator");
ActiveDeviceTP[ACTIVE_FILTER].fill("ACTIVE_FILTER", "Filter", "CCD Simulator");
ActiveDeviceTP[ACTIVE_SKYQUALITY].fill("ACTIVE_SKYQUALITY", "Sky Quality", "SQM");
ActiveDeviceTP.fill(getDeviceName(), "ACTIVE_DEVICES", "Snoop devices", OPTIONS_TAB, IP_RW, 60, IPS_IDLE);
ActiveDeviceTP.load();

Expand Down

0 comments on commit 7e4dcba

Please sign in to comment.