diff --git a/platformio.ini b/platformio.ini index e6d53348..be779b28 100644 --- a/platformio.ini +++ b/platformio.ini @@ -29,7 +29,6 @@ extra_scripts = pre:prebuild.py build_flags = -D CORE_DEBUG_LEVEL=0 # For debugging set to 3 and enable debug mode in the app -D MIN_PUBLISH_INTERVAL=30 # Minimum interval between clouds updates - -D MAIN_HW_EN_PIN=27 # enable the main hardware pin (main sensor) -D WAIT_FOR_PM_SENSOR=25 # time of stabilization of PM sensors in seconds -D ARDUINO_ESP32_DEV=1 # compatibilty for DFRobot NH3/CO library -D DISABLE_ALL_LIBRARY_WARNINGS=1 @@ -54,11 +53,13 @@ board = lolin32 framework = ${common.framework} upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} -build_flags = ${common.build_flags} lib_deps = ${common.lib_deps} monitor_filters = ${common.monitor_filters} extra_scripts = ${common.extra_scripts} board_build.partitions = min_spiffs.csv +build_flags = + ${common.build_flags} + -D MAIN_HW_EN_PIN=27 # enable the main hardware pin (main sensor) [oled_common] extends = esp32_common @@ -150,12 +151,14 @@ board = seeed_xiao_esp32c3 [esp32s3_common] extends = oled_common +platform = espressif32 @ 6.5.0 board = esp32-s3-devkitc-1 board_build.mcu = esp32s3 board_build.f_cpu = 240000000L build_flags = - ${common.build_flags} - -DBOARD_HAS_PSRAM=1 + ${common.build_flags} + -D BOARD_HAS_PSRAM=1 + -D MAIN_HW_EN_PIN=3 # enable the main hardware pin (main sensor) ; ESP32S3 DEVKIT (Also ESP32S3 CAM) [env:ESP32S3] @@ -164,7 +167,8 @@ extends = esp32s3_common [env:TTGO_T7S3] extends = esp32s3_common build_flags = - ${common.build_flags} + ${common.build_flags} + -D MAIN_HW_EN_PIN=3 # enable the main hardware pin (main sensor) -D ARDUINO_USB_CDC_ON_BOOT=1 [env:LORADEVKIT] @@ -181,17 +185,17 @@ lib_deps = ;sabas1080/CayenneLPP @ ^1.1.0 https://github.com/ElectronicCats/CayenneLPP build_flags = - ${common.build_flags} - -D RXD2=23 - -D TXD2=17 - -D hal_init=LMICHAL_init - -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS - -D CFG_eu868=1 - -D CFG_sx1276_radio=1 - -D LMIC_PRINTF_TO=Serial - -D LMIC_DEBUG_LEVEL=2 - -D DISABLE_PING=1 - -D DISABLE_BEACONS=1 - -D ARDUINO_SAMD_VARIANT_COMPLIANCE=1 - -D TTGOLORA32V1 + ${common.build_flags} + -D RXD2=23 + -D TXD2=17 + -D hal_init=LMICHAL_init + -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS + -D CFG_eu868=1 + -D CFG_sx1276_radio=1 + -D LMIC_PRINTF_TO=Serial + -D LMIC_DEBUG_LEVEL=2 + -D DISABLE_PING=1 + -D DISABLE_BEACONS=1 + -D ARDUINO_SAMD_VARIANT_COMPLIANCE=1 + -D TTGOLORA32V1 ;lib_ignore = gui-utils-tft diff --git a/src/power.cpp b/src/power.cpp index e6efad21..3d10c5b1 100644 --- a/src/power.cpp +++ b/src/power.cpp @@ -83,9 +83,7 @@ void powerInit() { WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); // Disable Brownout Detector // set cpu speed low to save battery setCpuFrequencyMhz(240); - Serial.print("-->[POWR] CPU Speed: "); - Serial.print(getCpuFrequencyMhz()); - Serial.println(" MHz"); + Serial.printf("-->[POWR] CPU Speed:%i MHz\r\n",getCpuFrequencyMhz()); powerEnableSensors(); }