From 9ad36a609a59b64539282f380049afbc2b85ce05 Mon Sep 17 00:00:00 2001 From: Max-Plastix Date: Tue, 21 Dec 2021 10:42:46 -0800 Subject: [PATCH] Fixed power-on Logo display (was not showing) --- main/configuration.h | 2 +- main/main.ino | 21 ++++++--------------- platformio.ini | 4 ++-- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/main/configuration.h b/main/configuration.h index e302503..a113893 100644 --- a/main/configuration.h +++ b/main/configuration.h @@ -58,7 +58,7 @@ along with this program. If not, see . // Less common Configuration iteams // ----------------------------------------------------------------------------- -#define ALWAYS_SHOW_LOGO // It's a great logo. Display it with pride. +//#define ALWAYS_SHOW_LOGO // It's a great logo. Display it with pride. #define LOGO_DELAY 2000 // Time to show logo on first boot (ms) #define DEBUG_PORT Serial // Serial debug port diff --git a/main/main.ino b/main/main.ino index c2298a6..0fc3611 100644 --- a/main/main.ino +++ b/main/main.ino @@ -401,19 +401,10 @@ void scanI2Cdevice(void) void axp192Init() { if (axp192_found) { if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) { - Serial.println("AXP192 Begin PASS"); + // Serial.println("AXP192 Begin PASS"); } else { - Serial.println("AXP192 Begin FAIL"); + Serial.println("axp.begin() FAIL"); } - #if 0 - Serial.printf("DCDC1: %s\n", axp.isDCDC1Enable() ? "ENABLE" : "DISABLE"); - Serial.printf("DCDC2: %s\n", axp.isDCDC2Enable() ? "ENABLE" : "DISABLE"); - Serial.printf("LDO2: %s\n", axp.isLDO2Enable() ? "ENABLE" : "DISABLE"); - Serial.printf("LDO3: %s\n", axp.isLDO3Enable() ? "ENABLE" : "DISABLE"); - Serial.printf("DCDC3: %s\n", axp.isDCDC3Enable() ? "ENABLE" : "DISABLE"); - Serial.printf("Exten: %s\n", axp.isExtenEnable() ? "ENABLE" : "DISABLE"); - Serial.println("----------------------------------------"); -#endif axp.setPowerOutPut(AXP192_LDO2, AXP202_ON); // LORA radio axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // GPS main power @@ -425,7 +416,7 @@ void axp192Init() { axp.setChgLEDMode(AXP20X_LED_BLINK_4HZ); //axp.setChgLEDMode(AXP20X_LED_OFF); - +#if 0 Serial.printf("DCDC1: %s\n", axp.isDCDC1Enable() ? "ENABLE" : "DISABLE"); Serial.printf("DCDC2: %s\n", axp.isDCDC2Enable() ? "ENABLE" : "DISABLE"); Serial.printf("DCDC3: %s\n", axp.isDCDC3Enable() ? "ENABLE" : "DISABLE"); @@ -433,6 +424,7 @@ void axp192Init() { Serial.printf("LDO2: %s\n", axp.isLDO2Enable() ? "ENABLE" : "DISABLE"); Serial.printf("LDO3: %s\n", axp.isLDO3Enable() ? "ENABLE" : "DISABLE"); Serial.printf("Exten: %s\n", axp.isExtenEnable() ? "ENABLE" : "DISABLE"); +#endif pinMode(PMU_IRQ, INPUT_PULLUP); attachInterrupt(PMU_IRQ, [] { @@ -497,15 +489,14 @@ void setup() { // Show logo on first boot after removing battery #ifndef ALWAYS_SHOW_LOGO - if (bootCount == 0) { + if (bootCount <= 1) #endif + { screen_print(APP_NAME " " APP_VERSION, 0, 0); screen_show_logo(); screen_update(); delay(LOGO_DELAY); -#ifndef ALWAYS_SHOW_LOGO } -#endif // Helium setup if (!ttn_setup()) { diff --git a/platformio.ini b/platformio.ini index 92099f4..08d8baa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,8 +24,8 @@ build_flags = -Wall -D LMIC_DEBUG_LEVEL=0 -D ARDUINO_TTGO_LoRa32_V1 monitor_speed = 115200 -monitor_port = COM19 -upload_port = COM19 +monitor_port = COM17 +; upload_port = COM17 lib_deps = mcci-catena/MCCI LoRaWAN LMIC library @ ^4.0.0 thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays @ ^4.2.1