
m3pi for proj2
Dependencies: RemoteIR m3pi mbed-rtos mbed
Diff: LightCommunication.cpp
- Revision:
- 2:70240992e869
- Parent:
- 1:76cff32344d1
- Child:
- 3:ecb3fa0406e8
diff -r 76cff32344d1 -r 70240992e869 LightCommunication.cpp --- a/LightCommunication.cpp Tue May 09 23:02:13 2017 +0200 +++ b/LightCommunication.cpp Tue May 09 23:06:05 2017 +0200 @@ -46,7 +46,7 @@ mut.unlock(); } -float LightCommunication::getRight(float cur_right) const { +float LightCommunication::getRight(float cur_right){ float r = right - cur_right; if (r>0){ return (cur_right + 0.005); @@ -58,7 +58,7 @@ } } -float LightCommunication::getLeft(float cur_left) const { +float LightCommunication::getLeft(float cur_left){ mut.lock(); float l = left - cur_left;