Skip to content

Commit 5c302bb

Browse files
author
Wilbert Alberts
committed
Fix: ensure movement and proper servo frequency.
1 parent d563ac8 commit 5c302bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Raspberry/eclipse/RoverBin/src/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ int main(int argc, char* argv[])
2828

2929
RV_loggingOff();
3030
RV_loopLoggingOff();
31-
RV_setFrequency(1);
31+
RV_setFrequency(100);
3232
RV_start();
33-
RV_move(RV_FORWARD, RV_FORWARD, 0,0);
33+
RV_move(RV_BACKWARD, RV_FORWARD, 20, 70);
3434
for (int i=0; 1 || i<10000; i++) {
3535
RV_getPosition(&left, &right);
3636
//printf("left: %ld, right: %ld\n", left, right);
@@ -39,10 +39,10 @@ int main(int argc, char* argv[])
3939
//printf("left: %ld, right: %ld, NE: %d, SE: %d, SW: %d, NW: %d\n",
4040
// left, right, sig[0], sig[1], sig[2], sig[3]);
4141

42-
if (mustStop(&collisionSensors)) {
43-
RV_move(RV_FORWARD, RV_FORWARD, 0, 0);
44-
i=100000;
45-
}
42+
//if (mustStop(&collisionSensors)) {
43+
// RV_move(RV_FORWARD, RV_FORWARD, 0, 0);
44+
// i=100000;
45+
//}
4646

4747
RV_getLineSensors(&lineSensors);
4848
printf("left: %ld, right: %ld, active: N: %d, E: %d, S: %d, W: %d, ambient: N: %d, E: %d, S: %d, W: %d\n",

0 commit comments

Comments
 (0)