fix merge
This commit is contained in:
parent
34d2c82fd9
commit
654fca9e67
1 changed files with 2 additions and 0 deletions
|
@ -56,6 +56,8 @@ bool Session::parse(std::string s)
|
||||||
} else if (s.size()>=3&&s[0]=='v'&&s[1]==' ') {
|
} else if (s.size()>=3&&s[0]=='v'&&s[1]==' ') {
|
||||||
//set speed
|
//set speed
|
||||||
double speed = atof(s.substr(2).c_str());
|
double speed = atof(s.substr(2).c_str());
|
||||||
|
if(speed<0)speed=0;
|
||||||
|
if(speed>3)speed=3;
|
||||||
m_state->setSpeed(m_pid, speed);
|
m_state->setSpeed(m_pid, speed);
|
||||||
|
|
||||||
} else if (token == "dev") {
|
} else if (token == "dev") {
|
||||||
|
|
Loading…
Reference in a new issue