Compare commits
2 Commits
5e431ffdea
...
c3f1842b86
| Author | SHA1 | Date | |
|---|---|---|---|
| c3f1842b86 | |||
| 8261199b9f |
7
.vscode/arduino.json
vendored
7
.vscode/arduino.json
vendored
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"board": "SparkFun:avr:promicro",
|
||||
"programmer": "AVR ISP",
|
||||
"port": "COM11",
|
||||
"sketch": "connect_switch.ino",
|
||||
"configuration": "cpu=16MHzatmega32U4"
|
||||
}
|
||||
18
.vscode/c_cpp_properties.json
vendored
18
.vscode/c_cpp_properties.json
vendored
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\avr\\1.1.13\\**",
|
||||
"C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\**",
|
||||
"C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\**"
|
||||
],
|
||||
"forcedInclude": [],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -36,6 +36,7 @@ struct arrow newestArrow;
|
||||
#define ButtonInfoTableSize 9
|
||||
struct ButtonInfo buttonInfoTable[ButtonInfoTableSize];
|
||||
|
||||
Hat last = Hat::CENTER;
|
||||
|
||||
void perms() {
|
||||
if(val == 0){
|
||||
@@ -103,7 +104,6 @@ void setup()
|
||||
oldestArrow.arrowSymbol = Hat::CENTER;
|
||||
newestArrow.older = &oldestArrow;
|
||||
newestArrow.newer = NULL;
|
||||
|
||||
}
|
||||
|
||||
void handleButtonInput(ButtonInfo *but){
|
||||
@@ -158,8 +158,10 @@ void loop()
|
||||
arrowTable[i].prev = arrowTable[i].current;
|
||||
}
|
||||
|
||||
|
||||
SwitchControlLibrary().MoveHat(static_cast<uint8_t>(newestArrow.older->arrowSymbol));
|
||||
if(newestArrow.older->arrowSymbol != last){
|
||||
last = newestArrow.older->arrowSymbol;
|
||||
SwitchControlLibrary().MoveHat(static_cast<uint8_t>(newestArrow.older->arrowSymbol));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user