Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 0b78d38 commit 304b360
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/float/float_transceiver/float_transceiver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,19 @@ bool profileAndWait(int limitPin) {

// Instruct the motor to travel to a position
// TODO: convert 'position' to an actual meaningful value
bool travelTo(int pos){
bool travelTo(int pos) {
encoder.update();
if(pos < (int)encoder.step - STEP_TOL){
if (pos < (int)encoder.step - STEP_TOL) {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
return false;
} else if(pos > (int)encoder.step + STEP_TOL){
}
else if (pos > (int)encoder.step + STEP_TOL) {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
return false;
} else {
}
else {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
return true;
Expand Down

0 comments on commit 304b360

Please sign in to comment.