Skip to content

Commit

Permalink
Add TIMEDEBUG flag for timing measurements in CO2_Gadget.ino and plat…
Browse files Browse the repository at this point in the history
…formio.ini
  • Loading branch information
melkati committed May 1, 2024
1 parent 5430182 commit c3af39d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CO2_Gadget.ino
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ uint16_t timeToWaitForImprov = 0; // Time in seconds to wait for improv serial
#include <FS.h>
#include <SPIFFS.h>

// Stream& miSerialPort = Serial;
#ifdef TIMEDEBUG
#include "Timer.h"
Timer timer;
Timer timerAwake;
Timer timerLightSleep;
#endif

enum notificationTypes { notifyNothing,
notifyInfo,
Expand Down
8 changes: 5 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ build_flags =
; -DDEBUG_IMPROV_WIFI
; -DDEBUG_ARDUINOMENU
; -DMENU_DEBUG ; Needs streamFlow library
-DWIFI_PRIVACY ; Comment to show WiFi & MQTT passwords in pain text in serial and the menu (if active no passwords will be shown)
-DWIFI_PRIVACY ; Comment to show WiFi & MQTT passwords in pain text in serial and the menu (if active no passwords will be shown)
-DTIMEDEBUG ; Show timing measurements debug in serial monitor
-DDISABLE_DIAGNOSTIC_OUTPUT ; Comment to show e-Ink display diagnostic output in serial monitor
-D CORE_DEBUG_LEVEL=0 ; 0=No debug, 1=Error, 2=Warning, 3=Info, 4=Debug, 5=Verbose

Expand Down Expand Up @@ -66,15 +67,16 @@ lib_deps =
https://github.com/melkati/Improv-WiFi-Library.git
rlogiacco/Battery Sense @ ^1.1.2
adafruit/Adafruit NeoPixel@^1.10.3
; neu-rah/streamFlow @ 0.0.0-alpha+sha.bf16ce8926 ; Needed for -D MENU_DEBUG
; neu-rah/streamFlow @ 0.0.0-alpha+sha.bf16ce8926 ; Needed for -D MENU_DEBUG
https://github.com/sstaub/Timer.git
build_flags =
${features.build_flags}
${debug.build_flags}
'-DWIFI_SSID_CREDENTIALS=""'
'-DWIFI_PW_CREDENTIALS=""'
-D MQTT_BROKER_SERVER="\"192.168.1.145"\"
-D CO2_GADGET_VERSION="\"0.12."\"
-D CO2_GADGET_REV="\"058-development"\"
-D CO2_GADGET_REV="\"059-development"\"
-DCACHE_DIR=".pio/build"
-DBUZZER_PIN=2 ; ESP32 pin GPIO13 connected to piezo buzzer
-DNEOPIXEL_PIN=26 ; Pinnumber for button for down/next and back / exit actions
Expand Down

0 comments on commit c3af39d

Please sign in to comment.