UI Spectrum + BT and Compass Fixes

This commit is contained in:
Egor
2025-01-30 20:14:53 -08:00
parent c3ab8859b6
commit ffa84ae26f
8 changed files with 486 additions and 70 deletions
+6 -4
View File
@@ -111,7 +111,7 @@ HardwareSerial SerialGPS(GPS_RX_PIN, GPS_TX_PIN);
#include "driver/gpio.h"
#endif // ARDUINO_ARCH_ESP32
DISPLAY_MODEL *u8g2 = NULL;
// DISPLAY_MODEL *u8g2 = NULL;
static DevInfo_t devInfo;
#ifdef HAS_GPS
@@ -530,6 +530,7 @@ void loopPMU()
bool beginDisplay()
{
/**
Wire.beginTransmission(DISPLAY_ADDR);
if (Wire.endTransmission() == 0)
{
@@ -552,7 +553,7 @@ bool beginDisplay()
}
Serial.printf("Warning: Failed to find Display at 0x%0X address\n", DISPLAY_ADDR);
return false;
return false;*/
}
bool beginSDCard()
@@ -847,7 +848,7 @@ void printResult(bool radio_online)
Serial.println((psramFound()) ? "+" : "-");
Serial.print("Display : ");
Serial.println((u8g2) ? "+" : "-");
// Serial.println((u8g2) ? "+" : "-");
#ifdef HAS_SDCARD
Serial.print("Sd Card : ");
@@ -866,7 +867,7 @@ void printResult(bool radio_online)
#endif
#endif
if (u8g2)
/*if (u8g2)
{
u8g2->clearBuffer();
@@ -895,6 +896,7 @@ void printResult(bool radio_online)
delay(2000);
}
*/
#endif
}
+4 -4
View File
@@ -23,12 +23,12 @@
#include <Arduino.h>
#include <SPI.h>
#include <U8g2lib.h>
// #include <U8g2lib.h>
#include <Wire.h>
#include <XPowersLib.h>
#ifndef DISPLAY_MODEL
#define DISPLAY_MODEL U8G2_SSD1306_128X64_NONAME_F_HW_I2C
// #define DISPLAY_MODEL U8G2_SSD1306_128X64_NONAME_F_HW_I2C
#endif
#ifndef OLED_WIRE_PORT
@@ -57,7 +57,7 @@ typedef struct
uint8_t flashSpeed;
} DevInfo_t;
void setupBoards(bool disable_u8g2 = false);
void setupBoards(bool disable_u8g2 = true);
bool beginSDCard();
@@ -81,7 +81,7 @@ void loopPMU();
extern XPowersLibInterface *PMU;
extern bool pmuInterrupt;
#endif
extern DISPLAY_MODEL *u8g2;
// extern DISPLAY_MODEL *u8g2;
#define U8G2_HOR_ALIGN_CENTER(t) ((u8g2->getDisplayWidth() - (u8g2->getUTF8Width(t))) / 2)
#define U8G2_HOR_ALIGN_RIGHT(t) (u8g2->getDisplayWidth() - u8g2->getUTF8Width(t))
+2 -2
View File
@@ -413,7 +413,7 @@
#define __HAS_SENSOR__
#define PMU_WIRE_PORT Wire1
#define DISPLAY_MODEL U8G2_SH1106_128X64_NONAME_F_HW_I2C
// #define DISPLAY_MODEL U8G2_SH1106_128X64_NONAME_F_HW_I2C
#define BOARD_VARIANT_NAME "T-Beam S3"
#elif defined(T_MOTION_S76G)
@@ -545,7 +545,7 @@
#define __HAS_SENSOR__
#define PMU_WIRE_PORT Wire
#define DISPLAY_MODEL U8G2_SH1106_128X64_NONAME_F_HW_I2C
// #define DISPLAY_MODEL U8G2_SH1106_128X64_NONAME_F_HW_I2C
#define BOARD_VARIANT_NAME "T-Beam BPF"
#else
+1 -1
View File
@@ -13,7 +13,7 @@ struct RadioModule
virtual float getRSSI() = 0;
};
#ifdef USING_SX1262
#ifndef USING_SX1262_no
struct SX1262Module : RadioModule
{
SX1262 *_radio;