mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-22 01:31:16 +03:00
SEWcontrol: allow to set zero speed
This commit is contained in:
@@ -83,7 +83,7 @@ int main(int argc, char **argv){
|
||||
#endif
|
||||
*/
|
||||
CANcmd mesg = CMD_GETSPEED;
|
||||
if(GP->setspeed){
|
||||
if(GP->setspeed != INT_MAX){
|
||||
if(GP->stop) ERRX("Commands 'stop' and 'set speed' can't be together");
|
||||
if(GP->setspeed < -0xffff/5 || GP->setspeed > 0xffff/5) ERRX("Parameter 'set speed' should be |int16_t| < %d", 0xffff/5);
|
||||
mesg = CMD_SETSPEED;
|
||||
|
||||
Reference in New Issue
Block a user