notify_on_stop errors if not moving
notify_on_stop now gives an error if it's called while the stage is not moving. This means you can safely issue the command and await a response. If the stage is moving, it will block until the stage stops. If it's not moving, it will return immediately.
This commit is contained in:
parent
71f0da35a2
commit
165f619869
1 changed files with 8 additions and 1 deletions
|
|
@ -281,7 +281,14 @@ void is_stage_moving(String command)
|
|||
|
||||
void activate_notify_on_stop(String command)
|
||||
{
|
||||
notify_on_stop = true;
|
||||
if (!stage_moving)
|
||||
{
|
||||
Serial.println("Error: stage is not moving");
|
||||
}
|
||||
else
|
||||
{
|
||||
notify_on_stop = true;
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: move help strings to program memory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue