|
|
|
@ -19,8 +19,8 @@
|
|
|
|
|
#define DELAY 4000000 // This is bad -- it's a value that was found to be OK
|
|
|
|
|
#define STM32F1 1 // Needed for libopencm3
|
|
|
|
|
|
|
|
|
|
enum {FORWARD, BACKWARD} direction;
|
|
|
|
|
bool running = false;
|
|
|
|
|
volatile enum {FORWARD, BACKWARD} direction;
|
|
|
|
|
volatile bool running = false;
|
|
|
|
|
|
|
|
|
|
void setup (void) { // All the blackbox code
|
|
|
|
|
|
|
|
|
@ -79,6 +79,9 @@ int main (void) {
|
|
|
|
|
char state = 0;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
// Initial wait
|
|
|
|
|
while (!running) ;
|
|
|
|
|
|
|
|
|
|
while (true) {
|
|
|
|
|
for (i=0 ; i<DELAY ; i++) {
|
|
|
|
|
__asm ("nop");
|
|
|
|
|