Revision 1461
updated all the library code to have sensible _init behavior.
Almost all of the library components have a global variable which gets set after init and the functions inside will fail with an error code if init has not been called. Also, the init functions themselves check this variable and will bail out without doing any damage if that init has already been called
test_motors.c | ||
---|---|---|
61 | 61 |
delay_ms(3000); |
62 | 62 |
//while(1){;} |
63 | 63 |
|
64 |
|
|
65 |
motors_off(); |
|
66 |
|
|
64 | 67 |
return 0; |
65 | 68 |
} |
66 | 69 |
|
... | ... | |
69 | 72 |
left >154 forward |
70 | 73 |
right >150 forward |
71 | 74 |
both >152 backward |
72 |
*/ |
|
75 |
*/ |
Also available in: Unified diff