Skip to content

Commit

Permalink
Merge branch 'master' of github.com:indilib/indi
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Apr 22, 2018
2 parents a1429fc + 7f578ea commit 9527841
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/indi-gphoto/gphoto_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static void *stop_bulb(void *arg)
if (gphoto->command & DSLR_CMD_BULB_CAPTURE)
{
gettimeofday(&curtime, nullptr);
timersub(&curtime, &gphoto->bulb_end, &diff);
timersub(&gphoto->bulb_end, &curtime, &diff);
timeleft = diff.tv_sec * 1000 + diff.tv_usec / 1000;
DEBUGFDEVICE(device, INDI::Logger::DBG_DEBUG, "Time left: %ld ms", timeleft);
}
Expand Down
9 changes: 6 additions & 3 deletions libindi/drivers/telescope/lx200_OnStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ bool LX200_OnStep::ISNewNumber(const char *dev, const char *name, double values[
BacklashNP.s = IPS_ALERT;
IDSetNumber(&BacklashNP, "Error Backlash DEC limit.");
}
usleep(100000); // time for OnStep to respond to previous cmd
const struct timespec timeout = {0, 100000000L};
nanosleep(&timeout, NULL); // time for OnStep to respond to previous cmd
snprintf(cmd, 9, ":$BR%d#", (int)bklshra);
if (sendOnStepCommand(cmd))
{
Expand Down Expand Up @@ -709,7 +710,8 @@ bool LX200_OnStep::ISNewSwitch(const char *dev, const char *name, ISState *state
strcpy(cmd, ":FQ#");
}
sendOnStepCommandBlind(cmd);
usleep(100000); // Pulse 0,1 s
const struct timespec timeout = {0, 100000000L};
nanosleep(&timeout, NULL); // Pulse 0,1 s
if(index != 2)
{
sendOnStepCommandBlind(":FQ#");
Expand Down Expand Up @@ -756,7 +758,8 @@ bool LX200_OnStep::ISNewSwitch(const char *dev, const char *name, ISState *state
strcpy(cmd, ":fQ#");
}
sendOnStepCommandBlind(cmd);
usleep(100000); // Pulse 0,1 s
const struct timespec timeout = {0, 100000000L};
nanosleep(&timeout, NULL); // Pulse 0,1 s
if(index != 2)
{
sendOnStepCommandBlind(":fQ#");
Expand Down

0 comments on commit 9527841

Please sign in to comment.