Skip to content

Commit

Permalink
Added ability to select a favorite board
Browse files Browse the repository at this point in the history
  • Loading branch information
rebane2001 committed Oct 24, 2020
1 parent bdb5793 commit 02ad4e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chanduino/chanduino.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#define BUTTON_1 35
#define BUTTON_2 0

// Change this to your favorite board to have it auto-selected
#define CHANDUINO_DEFAULTBOARD '/replaceme/'

TFT_eSPI tft = TFT_eSPI(135, 240); // Invoke custom library
Button2 btn1(BUTTON_1);
Button2 btn2(BUTTON_2);
Expand Down Expand Up @@ -347,6 +350,8 @@ void load_boards() {
desc.replace("is 4chan's imageboard", "-");
boards_ds.push_back(desc);
boards_ws.push_back(jsonDoc["boards"][i]["ws_board"].as<int>());
if (desc.indexOf(CHANDUINO_DEFAULTBOARD) > 0)
currentreply = i;
}
Serial.println("END");
}
Expand Down

0 comments on commit 02ad4e0

Please sign in to comment.