Revision 1094
simulating rangefinder and smart run around
changed the position of IR sensors defined in libsim
libsim and libdragonfly use different numbering for IRs (#418, #419)
added smart_run_around to template, right now it just hits wall, backs
up then segfaults
main.c | ||
---|---|---|
1 | 1 |
#include <dragonfly_lib.h> |
2 |
#include "smart_run_around_fsm.h" |
|
2 | 3 |
|
3 | 4 |
int main(void) |
4 | 5 |
{ |
5 | 6 |
dragonfly_init(ALL_ON); |
6 |
bom_leds_on(BOM_ALL); |
|
7 |
motor1_set(1, 200); |
|
8 |
motor2_set(1, 150); |
|
7 |
//bom_leds_on(BOM_ALL); |
|
8 |
//motor1_set(1, 210); |
|
9 |
//motor2_set(1, 200); |
|
10 |
run_around_init(); |
|
9 | 11 |
while(1){ |
10 |
simulator_do(); |
|
11 |
} |
|
12 |
run_around_FSM(); |
|
13 |
simulator_do(); |
|
14 |
} |
|
12 | 15 |
return 0; |
13 | 16 |
} |
14 | 17 |
|
Also available in: Unified diff