T_Beam Supreme Added

This commit is contained in:
richonguzman 2024-01-03 19:43:45 -03:00
parent 03310ddcad
commit 2bb92fe650
6 changed files with 16 additions and 75 deletions

View File

@ -34,7 +34,7 @@ BluetoothSerial SerialBT;
OneButton userButton = OneButton(BUTTON_PIN, true, true);
#endif
String versionDate = "2024.01.02";
String versionDate = "2024.01.04";
int myBeaconsIndex = 0;
int myBeaconsSize = Config.beacons.size();
@ -171,7 +171,7 @@ void loop() {
POWER_Utils::batteryManager();
if (!Config.simplifiedTrackerMode) {
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(TTGO_T_Beam_V1_2_SX1262)
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
userButton.tick();
#endif
}

View File

@ -65,16 +65,16 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
notification.ledTx = data["notification"]["ledTx"].as<bool>();
notification.ledTxPin = data["notification"]["ledTxPin"].as<int>();
notification.ledMessage = data["notification"]["ledMessage"].as<bool>();
notification.ledMessagePin = data["notification"]["ledMessagePin"].as<int>();
notification.ledMessagePin = data["notification"]["ledMessagePin"].as<int>();
notification.ledFlashlight = data["notification"]["ledFlashlight"].as<bool>();
notification.ledFlashlightPin = data["notification"]["ledFlashlightPin"].as<int>();
notification.buzzerActive = data["notification"]["buzzerActive"].as<bool>();
notification.buzzerPinTone = data["notification"]["buzzerPinTone"].as<int>();
notification.ledFlashlightPin = data["notification"]["ledFlashlightPin"].as<int>();
notification.buzzerActive = data["notification"]["buzzerActive"].as<bool>();
notification.buzzerPinTone = data["notification"]["buzzerPinTone"].as<int>();
notification.buzzerPinVcc = data["notification"]["buzzerPinVcc"].as<int>();
notification.bootUpBeep = data["notification"]["bootUpBeep"].as<bool>();
notification.txBeep = data["notification"]["txBeep"].as<bool>();
notification.messageRxBeep = data["notification"]["messageRxBeep"].as<bool>();
notification.stationBeep = data["notification"]["stationBeep"].as<bool>();
notification.bootUpBeep = data["notification"]["bootUpBeep"].as<bool>();
notification.txBeep = data["notification"]["txBeep"].as<bool>();
notification.messageRxBeep = data["notification"]["messageRxBeep"].as<bool>();
notification.stationBeep = data["notification"]["stationBeep"].as<bool>();
notification.lowBatteryBeep = data["notification"]["lowBatteryBeep"].as<bool>();
simplifiedTrackerMode = data["other"]["simplifiedTrackerMode"].as<bool>();

View File

@ -400,8 +400,7 @@ namespace MENU_Utils {
sixthRowMainMenu = "Battery " + batteryVoltage + "V " + batteryCharge + "mA";
}
#endif
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262)
//#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) //???????
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3)
if (Config.notification.lowBatteryBeep && !POWER_Utils::isCharging() && batteryCharge.toInt() < lowBatteryPercent) {
lowBatteryPercent = batteryCharge.toInt();
NOTIFICATION_Utils::lowBatteryBeep();

View File

@ -72,29 +72,12 @@
#define OLED_SDA 17
#define OLED_SCL 18
#define OLED_RST 16
//#define SDA 17 // writen in power_utils.cpp variable definitions
//#define SCL 18
//#define I2C1_SDA 42 // double defined in power_utils.cpp
//#define I2C1_SCL 41 // double defined in power_utils.cpp
//#define PMU_IRQ 40 // double defined in power_utils.cpp
//#define IRQ_PIN 40 // double defined in power_utils.cpp
#define GPS_RX 8 // changed to maintain the same "neo6m_gps.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);"
#define GPS_TX 9 // 8 for 9 and 9 for 8
/* NOT USED????
//#define GPS_WAKEUP_PIN 7 // ??
//#define GPS_1PPS_PIN 6 // ??*/
#define GPS_RX 8
#define GPS_TX 9
#define BUTTON_PIN 0
/* NOT USED????
//#define BUTTON_PIN_MASK GPIO_SEL_0 // ??
//#define BUTTON_CONUT 1 // ??
//#define BUTTON_ARRAY BUTTON_PIN // ??*/
#define RADIO_SCLK_PIN 12
#define RADIO_MISO_PIN 13
#define RADIO_MOSI_PIN 11
@ -104,39 +87,6 @@
#define RADIO_DIO1_PIN 1
#define RADIO_BUSY_PIN 4
/* NOT USED????
#define SPI_MOSI 35 // ??
#define SPI_SCK 36 // ??
#define SPI_MISO 37 // ??
#define SPI_CS 47 // ??
#define IMU_CS 34 // ??
#define IMU_INT 33 // ??*/
/* NOT USED????
#define SDCARD_MOSI SPI_MOSI // ??
#define SDCARD_MISO SPI_MISO // ??
#define SDCARD_SCLK SPI_SCK // ??
#define SDCARD_CS SPI_CS // ??*/
/* NOT USED????
#define PIN_NONE -1 // ??
#define RTC_INT 14 // ??*/
//#define GPS_BAUD_RATE 9600 // not used!!
/* NOT USED????
#define HAS_SDCARD // ??
#define HAS_GPS // ??
#define HAS_DISPLAY // ??
#define HAS_PMU // ??*/
/* NOT USED????
#define __HAS_SPI1__ // ??
#define __HAS_SENSOR__ // ??*/
//#define PMU_WIRE_PORT Wire1 // ??
//#define DISPLAY_MODEL U8G2_SH1106_128X64_NONAME_F_HW_I2C
#endif

View File

@ -1,4 +1,4 @@
#include "configuration.h"
#include "configuration.h"
#include "power_utils.h"
#include "pins_config.h"
#include "logger.h"
@ -37,11 +37,6 @@ namespace POWER_Utils {
String batteryVoltage = "";
String batteryChargeDischargeCurrent = "";
/* NOT USED????
void setPMUFlag() {
pmuInterrupt = true;
}*/
double getBatteryVoltage() {
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA_V2_1_GPS) || defined(TTGO_T_LORA_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS)
int adc_value;
@ -261,7 +256,7 @@ namespace POWER_Utils {
PMU.disableDLDO2();
PMU.setDC1Voltage(3300);
PMU.enableDC1();
PMU.setALDO1Voltage(2300); // screen brightness???
PMU.setALDO1Voltage(3300);
PMU.disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
}
return result;
@ -300,9 +295,7 @@ namespace POWER_Utils {
#endif
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
#ifdef I2C1_SDA // what is this validating?
Wire1.begin(I2C1_SDA, I2C1_SCL);
#endif
Wire.begin(I2C0_SDA, I2C0_SCL);
if (begin(Wire1)) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "AXP2101", "init done!");

View File

@ -20,8 +20,7 @@ extern bool flashlight;
namespace Utils {
static char locator[11];
// The letterize and getMaidenheadLocator functions are Copyright (c) 2021 Mateusz Salwach - MIT License
static char locator[11]; // letterize and getMaidenheadLocator functions are Copyright (c) 2021 Mateusz Salwach - MIT License
static char letterize(int x) {
return (char) x + 65;