Skip to content

Commit

Permalink
Fix console support not working
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyHaystack committed Oct 27, 2021
1 parent fc98e14 commit 2f31473
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

[env]
lib_ldf_mode = chain+
build_flags =
-Os
-fdata-sections
-ffunction-sections
-Wl,--gc-sections
-Wl,--print-gc-sections

[common]
default_src_filter =
Expand Down Expand Up @@ -88,4 +94,4 @@ board = megaatmega2560
extends = env:mega
src_build_flags =
-DSMASHBOX
-DNOUSB
-DNOUSB
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void loop() {
selectInputMode();

// Only run input viewer on every 3 updates, to prevent lag.
if (Serial && Serial.availableForWrite() > 32) {
if (Serial.availableForWrite() > 32) {
if (gReportClock == 0) {
writeSerialReport();
gReportClock++;
Expand Down
12 changes: 6 additions & 6 deletions src/modes/DefaultKeyboardMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ DefaultKeyboardMode::DefaultKeyboardMode(socd::SocdType socdType,
: KeyboardMode(socdType, rInputState) {}

void DefaultKeyboardMode::SendKeys() {
Press('q', mrInputState.l);
Press('3', mrInputState.left);
Press('4', mrInputState.down);
Press('5', mrInputState.right);
Press('a', mrInputState.l);
Press('b', mrInputState.left);
Press('c', mrInputState.down);
Press('d', mrInputState.right);
Press('e', mrInputState.mod_x);
Press('f', mrInputState.mod_y);
//Press('g', mrInputState.select);
Press('g', mrInputState.select);
Press('h', mrInputState.start);
//Press('i', mrInputState.home);
Press('i', mrInputState.home);
Press('j', mrInputState.r);
Press('k', mrInputState.y);
Press('l', mrInputState.lightshield);
Expand Down

0 comments on commit 2f31473

Please sign in to comment.