Skip to content
Permalink
Browse files

Add speed constants

It's nice to have some constants in live.
  • Loading branch information...
not7cd committed Jan 30, 2019
1 parent 44b1fd4 commit 3eaa1a22e3723a171accf72d238e0c8f39901935
Showing with 5 additions and 1 deletion.
  1. +2 −1 3rdparty/indi-starbook/command_interface.cpp
  2. +3 −0 3rdparty/indi-starbook/command_interface.h
@@ -168,6 +168,7 @@ namespace starbook {
res.equ = {0, 0};
ln_hequ_to_equ(&equ_posn, &res.equ);

// we should be able to parse whole response
if (cmd_res.empty()) {
return OK;
}
@@ -200,7 +201,7 @@ namespace starbook {
}

ResponseCode CommandInterface::SetSpeed(int speed) {
if (speed < 0 || speed > 7)
if (speed < MIN_SPEED || speed > MAX_SPEED)
return ERROR_FORMAT;

std::ostringstream cmd;
@@ -38,6 +38,9 @@ namespace starbook {
float major_minor;
} VersionResponse;

const int MIN_SPEED = 0;
const int MAX_SPEED = 7;

class CommandInterface {
public:

0 comments on commit 3eaa1a2

Please sign in to comment.
You can’t perform that action at this time.