Skip to content

Commit

Permalink
Remove setBLEHistoryInterval function call in CO2_Gadget_Sensors.h
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed May 8, 2024
1 parent 24f168b commit 9c2ea82
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
7 changes: 1 addition & 6 deletions CO2_Gadget.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ void outputsLoop(); // Defined in CO2_Gadget_Main.h
void publishMQTTLogData(String logData); // Defined in CO2_Gadget_MQTT.h
void putPreferences(); // Defined in CO2_Gadget_Preferences.h
void menuLoop(); // Defined in CO2_Gadget_Menu.h
void setBLEHistoryInterval(uint64_t interval); // Defined in CO2_Gadget_BLE.h
// void setBLEHistoryInterval(uint64_t interval); // Defined in CO2_Gadget_BLE.h

// Define enum for toneBuzzerBeep
enum ToneBuzzerBeep {
Expand Down Expand Up @@ -120,11 +120,6 @@ uint16_t co2RedRange = 1000;
bool waitingForImprov = true;
uint16_t timeToWaitForImprov = 0; // Time in seconds to wait for improv serial

#ifdef BUILD_GIT
#undef BUILD_GIT
#endif // ifdef BUILD_GIT
#define BUILD_GIT __DATE__

#ifdef CUSTOM_I2C_SDA
#undef I2C_SDA
#define I2C_SDA CUSTOM_I2C_SDA
Expand Down
2 changes: 1 addition & 1 deletion CO2_Gadget_Sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void initSensors() {
sensors.setCO2AltitudeOffset(altitudeMeters);
// sensors.setAutoSelfCalibration(false); // TO-DO: Implement in CanAirIO Sensors Lib

setBLEHistoryInterval(sampleInterval);
// setBLEHistoryInterval(sampleInterval);

Serial.printf("-->[SENS] Selected CO2 Sensor: %d\n", selectedCO2Sensor);

Expand Down
33 changes: 17 additions & 16 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ build_flags =
; -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)
-DTIMEDEBUG ; Show timing measurements debug in serial monitor
; -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 @@ -77,7 +77,7 @@ build_flags =
'-DWIFI_PW_CREDENTIALS=""'
-D MQTT_BROKER_SERVER="\"192.168.1.145"\"
-D CO2_GADGET_VERSION="\"0.12."\"
-D CO2_GADGET_REV="\"063-development"\"
-D CO2_GADGET_REV="\"064-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 All @@ -91,7 +91,7 @@ build_flags =
-DRED_PIN_HIGH=1 ; Should the RED_PIN_HIGH go high or low at threshold
-DPIN_HYSTERESIS=100 ; Hysteresis PPM to avoid pins going ON and OFF continuously. TODO : Minimum time to switch
-DBUZZER_HYSTERESIS=50 ; Hysteresis PPM to avoid BUZZER ON and OFF
-DHISTORY_INTERVAL_MILISECONDS=60000 ; Interval in miliseconds to save history data (60000 = 1 minute)
-DHISTORY_INTERVAL_MILISECONDS=60000 ; Interval in miliseconds to save history data for MyAmbiance (60000 = 1 minute)
-DHISTORY_RING_BUFFER_SIZE_BYTES=10000 ; Number of samples to keep in history for MyAmbiance. Try to save memory by using just what you need (recommended < 10000 for boards without PSRAM).

-DMQTT_DISCOVERY_PREFIX="\"homeassistant/\""
Expand All @@ -107,7 +107,7 @@ build_flags =
;****************************************************************************************

[env:esp32dev]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
Expand Down Expand Up @@ -208,7 +208,7 @@ build_flags =
-DSPI_READ_FREQUENCY=6000000

[env:TTGO_TDISPLAY]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
Expand All @@ -228,7 +228,7 @@ build_flags =
-DFLAVOUR="\"TTGO T-Display"\"

[env:TTGO_TDISPLAY_SANDWICH]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
Expand All @@ -244,13 +244,14 @@ lib_deps =
build_flags =
${common_env_data.build_flags}
${TTGO_TDISPLAY.build_flags}
-DHISTORY_INTERVAL_MILISECONDS=10000 ; Interval in miliseconds to save history data for MyAmbiance (10000 = 10 seconds)
-DCUSTOM_I2C_SDA=22 ; Override default pin for I2C SDA (for sandwich build)
-DCUSTOM_I2C_SCL=21 ; Override default pin for I2C SCL (for sandwich build)
-DUNITHOSTNAME="\"CO2-Gadget-S"\"
-DFLAVOUR="\"TTGO T-Display Sandwich"\"

[env:esp32dev_OLED]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_speed = ${common_env_data.upload_speed}
Expand All @@ -272,7 +273,7 @@ build_flags =
-DFLAVOUR="\"ESP32 OLED"\"

[env:TDISPLAY_S3]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = lilygo-t-display-s3
framework = ${common_env_data.framework}
monitor_filters = ${common_env_data.monitor_filters}
Expand Down Expand Up @@ -344,7 +345,7 @@ build_flags =
-DFLAVOUR="\"T-Display S3"\"

[env:esp32dev_ST7789_240x320]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
monitor_filters = ${common_env_data.monitor_filters}
Expand Down Expand Up @@ -396,7 +397,7 @@ build_flags =
-DFLAVOUR="\"ST7789_240x320"\"

[env:ttgo-t5-EINKBOARDGDEM0213B74]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_port = COM3
Expand All @@ -419,7 +420,7 @@ build_flags =
-DFLAVOUR="\"GDEM0213B74"\"

[env:ttgo-t5-EINKBOARDDEPG0213BN]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_port = COM4
Expand All @@ -443,7 +444,7 @@ build_flags =
-DFLAVOUR="\"DEPG0213BN"\"

[env:ttgo-t5-EINKBOARDGDEW0213M21]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_port = COM17
Expand All @@ -467,7 +468,7 @@ build_flags =
-DFLAVOUR="\"GDEW0213M21"\"

[env:ttgo-t7-EINKBOARDGDEM029T94]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
; board = esp32dev
board = ttgo-t7-v14-mini32
framework = ${common_env_data.framework}
Expand Down Expand Up @@ -496,7 +497,7 @@ build_flags =
-DFLAVOUR="\"GDEM029T94"\" ; Was GDEW029T5

[env:ttgo-t7-WEACT_GDEH0154D67]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
; board = esp32dev
board = ttgo-t7-v14-mini32
framework = ${common_env_data.framework}
Expand Down Expand Up @@ -525,7 +526,7 @@ build_flags =
-DFLAVOUR="\"GDEH0154D67-WeAct"\" ; GDEH0154D67 As WeAct Studio 1.54" 200x200 E-Ink Display

[env:ttgo-t7-WEACT_DEPG0213BN]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_port = COM11
Expand All @@ -549,7 +550,7 @@ build_flags =
-DFLAVOUR="\"DEPG0213BN-WeAct"\" ; DEPG0213BN As WeAct Studio 2.13" 250x122 E-Ink Display

[env:ttgo-t7-WEACT_GxEPD2_290_BS]
platform = espressif32 @ 6.6.0
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = ${common_env_data.framework}
upload_port = COM11
Expand Down

0 comments on commit 9c2ea82

Please sign in to comment.