Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
AR2100 authored Sep 15, 2024
2 parents 20fec0f + 4e55f62 commit 02a9740
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[platformio]
default_envs = StepperArm
default_envs = Main



[env:Main]
Expand Down
6 changes: 6 additions & 0 deletions src/SoloComputerControl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ int main() {
// protobuf::Messages::decodeRequest(requestBuffer, requestLength, requestMessage);
protobuf::Messages::decodeRequest(requestBuffer, requestLength, requestMessage);

if (requestMessage.leftSpeed > 4000) requestMessage.leftSpeed = 4000;
else if (requestMessage.leftSpeed < -4000) requestMessage.leftSpeed = -4000;

if (requestMessage.rightSpeed > 4000) requestMessage.rightSpeed = 4000;
else if (requestMessage.rightSpeed < -4000) requestMessage.rightSpeed = -4000;

Serial.print("left: ");
Serial.print(requestMessage.leftSpeed);
Serial.print(", right: ");
Expand Down

0 comments on commit 02a9740

Please sign in to comment.