removed definees 'ENABLE_...'

This commit is contained in:
Patrick Haßel 2023-01-01 17:32:31 +01:00
parent e47bc86299
commit 09cc27cdec
2 changed files with 2 additions and 16 deletions

View File

@ -13,8 +13,8 @@ platform = espressif32
board = esp32dev
framework = arduino
lib_deps = https://github.com/adafruit/Adafruit_NeoPixel
build_flags = -D ENABLE_ALL=true -D ENABLE_OTA=false
;upload_port = 10.0.0.120
build_flags =
;upload_port = 10.0.0.153
;upload_protocol = espota
upload_port = /dev/ttyUSB0
upload_speed = 921600

View File

@ -1,28 +1,21 @@
#include <WiFi.h>
#if ENABLE_OTA
#include <ArduinoOTA.h>
#endif
#include "mode/Mode.h"
#include "display/Display.h"
#include <WebServer.h>
#if ENABLE_ALL
#include "mode/GameOfLife/GameOfLife.h"
#include "mode/Pong/Pong.h"
#include "mode/Test/Border.h"
#include "mode/Clock/Clock.h"
#include "mode/SpaceInvaders/SpaceInvaders.h"
#endif
#include "mode/NewYear/NewYear.h"
enum ModeId {
NONE,
#if ENABLE_ALL
BORDER,
CLOCK,
GAME_OF_LIFE_BLACK_WHITE,
@ -31,7 +24,6 @@ enum ModeId {
GAME_OF_LIFE_RANDOM_COLOR,
PONG,
SPACE_INVADERS,
#endif
NEW_YEAR,
};
@ -112,7 +104,6 @@ void setup() {
WiFi.begin("HappyNet", "1Grausame!Sackratte7");
#if ENABLE_OTA
ArduinoOTA.onStart([]() {
display.clear();
display.loop();
@ -133,7 +124,6 @@ void setup() {
display.loop();
});
ArduinoOTA.begin();
#endif
server.on("", web_index);
server.on("/", web_index);
@ -151,9 +141,7 @@ void setup() {
void setSpeed(double value);
void loop() {
#if ENABLE_OTA
ArduinoOTA.handle();
#endif
server.handleClient();
bool hasIp = (uint32_t) WiFi.localIP() != 0;
if (!connected) {
@ -234,7 +222,6 @@ void loadNewMode() {
switch (currentModeId) {
case NONE:
break;
#if ENABLE_ALL
case BORDER:
mode = new Border(&display);
break;
@ -259,7 +246,6 @@ void loadNewMode() {
case SPACE_INVADERS:
mode = new SpaceInvaders(&display);
break;
#endif
case NEW_YEAR:
mode = new NewYear(&display);
break;