kopia lustrzana https://github.com/Max-Plastix/tbeam-helium-mapper
Fixed power-on Logo display (was not showing)
rodzic
0e04aa4e94
commit
9ad36a609a
|
@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// 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
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue