validating all boards

This commit is contained in:
richonguzman 2024-11-14 18:08:11 -03:00
parent 90068cf435
commit 0782289417
4 changed files with 19 additions and 15 deletions

View File

@ -349,6 +349,7 @@ build_flags =
lib_deps =
${common.lib_deps}
bodmer/TFT_eSPI @ 2.5.43
esphome/ESP32-audioI2S @ 2.0.7
[env:ttgo_t_deck_plus]
extends = env

View File

@ -153,14 +153,14 @@ void setup() {
#ifdef HAS_I2S
AUDIO_Utils::setup();
delay(500);
AUDIO_Utils::playMP3("bell.mp3");
#endif
POWER_Utils::lowerCpuFrequency();
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "Main", "Smart Beacon is: %s", Utils::getSmartBeaconState());
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "Setup Done!");
menuDisplay = 0;
AUDIO_Utils::playMP3("bell.mp3");
}
void loop() {

View File

@ -1,13 +1,12 @@
#include "boards_pinout.h"
#include "audio_utils.h"
#ifdef HAS_I2S
#include "Audio.h"
#include <SPIFFS.h>
#include "es7210.h"
#include <driver/i2s.h>
#ifdef HAS_I2S
Audio audio;
namespace AUDIO_Utils {

View File

@ -14,6 +14,8 @@ String currentSymbol, lastSymbol, lastHeader;
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite sprite = TFT_eSprite(&tft);
#define red 0xB061
#ifdef HELTEC_WIRELESS_TRACKER
#define bigSizeFont 2
#define smallSizeFont 1
@ -27,7 +29,7 @@ String currentSymbol, lastSymbol, lastHeader;
#define color1 TFT_BLACK
#define color2 0x0249
#define red 0xB061
#define green 0x1B08
#define bigSizeFont 4
@ -81,6 +83,7 @@ bool symbolAvailable = true;
extern logging::Logger logger;
#ifdef HAS_TFT
void drawTop(const String& header, const String& datetime, const String& location) {
sprite.fillSprite(TFT_BLACK);
sprite.fillRect(0, 0, 320, 38, red);
@ -104,17 +107,18 @@ void drawTop(const String& header, const String& datetime, const String& locatio
sprite.drawString(location, 8, 44);
}
void drawBody(const String& linea1, const String& linea2, const String& linea3, const String& linea4, const String& linea5, const String& linea6) {
sprite.setTextSize(2);
sprite.setTextColor(TFT_WHITE, TFT_BLACK);
void drawBody(const String& linea1, const String& linea2, const String& linea3, const String& linea4, const String& linea5, const String& linea6) {
sprite.setTextSize(2);
sprite.setTextColor(TFT_WHITE, TFT_BLACK);
sprite.drawString(linea1, 3, 70);
sprite.drawString(linea2, 3, 90);
sprite.drawString(linea3, 3, 110);
sprite.drawString(linea4, 3, 130);
sprite.drawString(linea5, 3, 150);
sprite.drawString(linea6, 3, 170);
}
sprite.drawString(linea1, 3, 70);
sprite.drawString(linea2, 3, 90);
sprite.drawString(linea3, 3, 110);
sprite.drawString(linea4, 3, 130);
sprite.drawString(linea5, 3, 150);
sprite.drawString(linea6, 3, 170);
}
#endif
/*String lat = location.substring(0, location.indexOf(" "));
sprite.drawString(lat, 3, 46);