diff --git a/.vscode/.BROWSE.VC.DB-shm b/.vscode/.BROWSE.VC.DB-shm new file mode 100644 index 0000000..732736e Binary files /dev/null and b/.vscode/.BROWSE.VC.DB-shm differ diff --git a/.vscode/.BROWSE.VC.DB-wal b/.vscode/.BROWSE.VC.DB-wal new file mode 100644 index 0000000..18fd783 Binary files /dev/null and b/.vscode/.BROWSE.VC.DB-wal differ diff --git a/micromouse/Controller.cpp b/micromouse/Controller.cpp index 866e324..37d4758 100644 --- a/micromouse/Controller.cpp +++ b/micromouse/Controller.cpp @@ -3,7 +3,7 @@ #include #include "Timer.h" #include "ButtonFlag.h" - +#include "TeensyFunctions.h" #ifdef __MK20DX256__ // Teensy Compile #include "WProgram.h" #else // pc compile diff --git a/micromouse/IRSensor.cpp b/micromouse/IRSensor.cpp index 694e385..673d78f 100644 --- a/micromouse/IRSensor.cpp +++ b/micromouse/IRSensor.cpp @@ -2,7 +2,7 @@ #include "Logger.h" #include "RobotIO.h" #include - +#include "TeensyFunctions.h" #ifdef __MK20DX256__ // Teensy Compile #include "WProgram.h" #endif diff --git a/micromouse/Memory.cpp b/micromouse/Memory.cpp index ab9530f..23c3ee2 100644 --- a/micromouse/Memory.cpp +++ b/micromouse/Memory.cpp @@ -1,6 +1,6 @@ #include "Memory.h" #include - +#include "TeensyFunctions.h" namespace Micromouse { int Memory::read(int address) diff --git a/micromouse/TeensyFunctions.h b/micromouse/TeensyFunctions.h index c745d1b..3577521 100644 --- a/micromouse/TeensyFunctions.h +++ b/micromouse/TeensyFunctions.h @@ -1,9 +1,65 @@ -#ifdef #ifdef __MK20DX256__ // Teensy Compile +#ifndef TEENSYFUNCTIONS_H +#define TEENSYFUNCTIONS_H + +#include "ButtonFlag.h" +//Teensy PC safe versions +//Controller.cpp + +extern volatile bool buttonFlag; + +#ifdef __MK20DX256__ // Teensy Compile #else //on windows -void delay(int milliseconds){}; +void delay(unsigned long milliseconds){}; #endif -#ifdef #ifdef __MK20DX256__ // Teensy Compile +#ifdef __MK20DX256__ // Teensy Compile #else //on windows void digitalWrite(int pin, bool high){}; #endif + +//The above definitions already complete +//Line 237 +//Line 263 +//Line 273 +//Line 287 + +//Line 301 +#ifdef __MK20DX256__ // Teensy Compile +#else + void cli(){}; + + if (!buttonFlag) + { + buttonFlag = true; + } + + void sei(){}; +#endif + +//Line 316 +#ifdef __MK20DX256__ // Teensy Compile +#else + void pinMode(int pin, bool mode){}; + void attachInterrupt(int pin, bool mode){}; +#endif + +//IRSensor.cpp +//Line 6 +#ifdef __MK20DX256__ // Teensy Compile +#else + #include +#endif + +//Line 48 already done +//Line 151 as well +//Line 201 -- pinMode (here on line 41) may fix it + +//Logger.h +//Line 3 already done +//Line 57 as well +//Line 113 as well +//Line 123 as well +//Line 138 -- +//Line 151 done +//Line 177 done +#endif \ No newline at end of file