todavia no pasa na
This commit is contained in:
parent
8847b3d05d
commit
5ed2867d66
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"beacons": [
|
"beacons": [
|
||||||
{
|
{
|
||||||
"callsign": "NOCALL-7",
|
"callsign": "CA2RXU-20",
|
||||||
"symbol": "[",
|
"symbol": "[",
|
||||||
"overlay": "/",
|
"overlay": "/",
|
||||||
"micE": "",
|
"micE": "",
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"callsign": "NOCALL-7",
|
"callsign": "CA2RXU-20",
|
||||||
"symbol": ">",
|
"symbol": ">",
|
||||||
"overlay": "/",
|
"overlay": "/",
|
||||||
"micE": "",
|
"micE": "",
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"callsign": "NOCALL-7",
|
"callsign": "CA2RXU-20",
|
||||||
"symbol": "b",
|
"symbol": "b",
|
||||||
"overlay": "/",
|
"overlay": "/",
|
||||||
"micE": "",
|
"micE": "",
|
||||||
|
|
|
||||||
|
|
@ -282,47 +282,44 @@ build_flags =
|
||||||
-D LOAD_FONT8
|
-D LOAD_FONT8
|
||||||
-D SPI_FREQUENCY=27000000
|
-D SPI_FREQUENCY=27000000
|
||||||
-D USE_HSPI_PORT
|
-D USE_HSPI_PORT
|
||||||
;-D LOAD_GFXFF
|
|
||||||
;-D SMOOTH_FONT
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
jgromes/RadioLib @ 6.1.0
|
jgromes/RadioLib @ 6.1.0
|
||||||
bodmer/TFT_eSPI@^2.5.43
|
bodmer/TFT_eSPI@^2.5.43
|
||||||
|
|
||||||
|
|
||||||
[env:ttgo_t_deck]
|
[env:ttgo_t_deck_gps]
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32s3box
|
||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
-DHELTEC_WIRELESS_TRACKER
|
-DTTGO_T_DECK_GPS
|
||||||
-DHAS_SX126X
|
-DHAS_SX126X
|
||||||
-DHIGH_GPS_BAUDRATE
|
|
||||||
-DHAS_TFT
|
-DHAS_TFT
|
||||||
-DARDUINO_USB_MODE=1
|
|
||||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
|
||||||
-D USER_SETUP_LOADED
|
-D USER_SETUP_LOADED
|
||||||
-D TFT_WIDTH=80
|
-D TFT_WIDTH=240
|
||||||
-D TFT_HEIGHT=160
|
-D TFT_HEIGHT=320
|
||||||
-D ST7735_DRIVER
|
-D ST7789_DRIVER
|
||||||
-D ST7735_GREENTAB160x80
|
|
||||||
-D TFT_RGB_ORDER=TFT_BGR
|
-D TFT_RGB_ORDER=TFT_BGR
|
||||||
-D TFT_MOSI=42
|
-D TFT_MISO=38
|
||||||
-D TFT_SCLK=41
|
-D TFT_MOSI=41
|
||||||
-D TFT_CS=38
|
-D TFT_SCLK=40
|
||||||
-D TFT_DC=40
|
-D TFT_CS=12
|
||||||
-D TFT_RST=39
|
-D TFT_DC=11
|
||||||
-D TFT_BL=21
|
-D TFT_RST=-1
|
||||||
|
-D TFT_BL=42
|
||||||
-D TFT_BACKLIGHT_ON=1
|
-D TFT_BACKLIGHT_ON=1
|
||||||
-D TOUCH_CS=-1
|
-D TOUCH_CS=16
|
||||||
-D LOAD_GLCD
|
-D LOAD_GLCD
|
||||||
-D LOAD_FONT2
|
-D LOAD_FONT2
|
||||||
-D LOAD_FONT4
|
-D LOAD_FONT4
|
||||||
-D LOAD_FONT6
|
-D LOAD_FONT6
|
||||||
-D LOAD_FONT7
|
-D LOAD_FONT7
|
||||||
-D LOAD_FONT8
|
-D LOAD_FONT8
|
||||||
-D SPI_FREQUENCY=27000000
|
-D SPI_FREQUENCY=40000000
|
||||||
-D USE_HSPI_PORT
|
-D SPI_READ_FREQUENCY=16000000
|
||||||
;-D LOAD_GFXFF
|
-D SPI_TOUCH_FREQUENCY=2500000
|
||||||
;-D SMOOTH_FONT
|
-D LOAD_GFXFF
|
||||||
|
-D SMOOTH_FONT
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
jgromes/RadioLib @ 6.1.0
|
jgromes/RadioLib @ 6.1.0
|
||||||
|
|
|
||||||
|
|
@ -213,8 +213,8 @@ void setup() {
|
||||||
menuDisplay = 0;
|
menuDisplay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {}
|
||||||
currentBeacon = &Config.beacons[myBeaconsIndex];
|
/*currentBeacon = &Config.beacons[myBeaconsIndex];
|
||||||
if (statusState) {
|
if (statusState) {
|
||||||
Config.validateConfigFile(currentBeacon->callsign);
|
Config.validateConfigFile(currentBeacon->callsign);
|
||||||
miceActive = Config.validateMicE(currentBeacon->micE);
|
miceActive = Config.validateMicE(currentBeacon->micE);
|
||||||
|
|
@ -276,4 +276,4 @@ void loop() {
|
||||||
MENU_Utils::showOnScreen();
|
MENU_Utils::showOnScreen();
|
||||||
refreshDisplayTime = millis();
|
refreshDisplayTime = millis();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
@ -25,7 +25,7 @@ SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUS
|
||||||
bool transmissionFlag = true;
|
bool transmissionFlag = true;
|
||||||
bool enableInterrupt = true;
|
bool enableInterrupt = true;
|
||||||
#endif
|
#endif
|
||||||
#if defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
SX1262 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
|
SX1262 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
|
||||||
bool transmissionFlag = true;
|
bool transmissionFlag = true;
|
||||||
bool enableInterrupt = true;
|
bool enableInterrupt = true;
|
||||||
|
|
@ -53,7 +53,7 @@ namespace LoRa_Utils {
|
||||||
float signalBandwidth = currentLoRaType->signalBandwidth/1000;
|
float signalBandwidth = currentLoRaType->signalBandwidth/1000;
|
||||||
radio.setBandwidth(signalBandwidth);
|
radio.setBandwidth(signalBandwidth);
|
||||||
radio.setCodingRate(currentLoRaType->codingRate4);
|
radio.setCodingRate(currentLoRaType->codingRate4);
|
||||||
#if defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
radio.setOutputPower(currentLoRaType->power + 2); // values available: 10, 17, 22 --> if 20 in tracker_conf.json it will be updated to 22.
|
radio.setOutputPower(currentLoRaType->power + 2); // values available: 10, 17, 22 --> if 20 in tracker_conf.json it will be updated to 22.
|
||||||
#endif
|
#endif
|
||||||
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
||||||
|
|
@ -105,7 +105,7 @@ namespace LoRa_Utils {
|
||||||
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
||||||
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
|
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
|
||||||
#endif
|
#endif
|
||||||
#if defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
state = radio.setOutputPower(currentLoRaType->power + 2); // values available: 10, 17, 22 --> if 20 in tracker_conf.json it will be updated to 22.
|
state = radio.setOutputPower(currentLoRaType->power + 2); // values available: 10, 17, 22 --> if 20 in tracker_conf.json it will be updated to 22.
|
||||||
#endif
|
#endif
|
||||||
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
#if defined(ESP32_DIY_1W_LoRa_GPS) || defined(OE5HWN_MeshCom)
|
||||||
|
|
|
||||||
|
|
@ -159,4 +159,35 @@
|
||||||
#define RADIO_BUSY_PIN 13 // SX1262 BUSY
|
#define RADIO_BUSY_PIN 13 // SX1262 BUSY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TTGO_T_DECK
|
||||||
|
#define GPS_RX 43
|
||||||
|
#define GPS_TX 44
|
||||||
|
#define BOARD_I2C_SDA 18
|
||||||
|
#define BOARD_I2C_SCL 8
|
||||||
|
#define BOARD_POWERON 10
|
||||||
|
#define BOARD_SDCARD_CS 39
|
||||||
|
|
||||||
|
#define RADIO_SCLK_PIN 40
|
||||||
|
#define RADIO_MISO_PIN 38
|
||||||
|
#define RADIO_MOSI_PIN 41
|
||||||
|
#define RADIO_CS_PIN 9
|
||||||
|
#define RADIO_RST_PIN 17
|
||||||
|
#define RADIO_DIO1_PIN 45
|
||||||
|
#define RADIO_BUSY_PIN 13
|
||||||
|
|
||||||
|
/*#define BOARD_I2S_WS 5
|
||||||
|
#define BOARD_I2S_BCK 7
|
||||||
|
#define BOARD_I2S_DOUT 6*/
|
||||||
|
|
||||||
|
// trackbal
|
||||||
|
/*#define TrackBallCenter 0
|
||||||
|
#define TrackBallUp 3 // G S1
|
||||||
|
#define TrackBallDown 15 // G S3
|
||||||
|
#define TrackBallLeft 1 // G S4
|
||||||
|
#define TrackBallRight 2 // G S2*/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -86,7 +86,7 @@ namespace POWER_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCharging() {
|
bool isCharging() {
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||||
|
|
@ -103,7 +103,7 @@ namespace POWER_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
double getBatteryChargeDischargeCurrent() {
|
double getBatteryChargeDischargeCurrent() {
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_AXP192
|
#ifdef HAS_AXP192
|
||||||
|
|
@ -118,7 +118,7 @@ namespace POWER_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isBatteryConnected() {
|
bool isBatteryConnected() {
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
if(getBatteryVoltage() > 1.0) {
|
if(getBatteryVoltage() > 1.0) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -135,7 +135,7 @@ namespace POWER_Utils {
|
||||||
if (!(rate_limit_check_battery++ % 60))
|
if (!(rate_limit_check_battery++ % 60))
|
||||||
BatteryIsConnected = isBatteryConnected();
|
BatteryIsConnected = isBatteryConnected();
|
||||||
if (BatteryIsConnected) {
|
if (BatteryIsConnected) {
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(OE5HWN_MeshCom)
|
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK)
|
||||||
batteryVoltage = String(getBatteryVoltage(), 2);
|
batteryVoltage = String(getBatteryVoltage(), 2);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_AXP2101
|
#ifdef HAS_AXP2101
|
||||||
|
|
@ -217,7 +217,7 @@ namespace POWER_Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool begin(TwoWire &port) {
|
bool begin(TwoWire &port) {
|
||||||
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER)
|
#if defined(TTGO_T_Beam_V0_7) || defined(ESP32_DIY_LoRa_GPS) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(HELTEC_V3_GPS) || defined(OE5HWN_MeshCom) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(HELTEC_WIRELESS_TRACKER) || defined(TTGO_T_DECK)
|
||||||
return true; // no powerManagment chip for this boards (only a few measure battery voltage).
|
return true; // no powerManagment chip for this boards (only a few measure battery voltage).
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_AXP192
|
#ifdef HAS_AXP192
|
||||||
|
|
@ -341,6 +341,31 @@ namespace POWER_Utils {
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
pinMode(BATTERY_PIN, INPUT);
|
pinMode(BATTERY_PIN, INPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(TTGO_T_DECK)
|
||||||
|
pinMode(BOARD_POWERON, OUTPUT);
|
||||||
|
//pinMode(BOARD_SDCARD_CS, OUTPUT);
|
||||||
|
pinMode(RADIO_CS_PIN, OUTPUT);
|
||||||
|
pinMode(TFT_CS, OUTPUT);
|
||||||
|
|
||||||
|
digitalWrite(BOARD_POWERON, HIGH);
|
||||||
|
delay(3000);
|
||||||
|
//digitalWrite(BOARD_SDCARD_CS, HIGH);
|
||||||
|
digitalWrite(RADIO_CS_PIN, HIGH);
|
||||||
|
digitalWrite(TFT_CS, HIGH);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*pinMode(TrackBallCenter, INPUT_PULLUP);
|
||||||
|
pinMode(TrackBallUp, INPUT_PULLUP);
|
||||||
|
pinMode(TrackBallDown, INPUT_PULLUP);
|
||||||
|
pinMode(TrackBallLeft, INPUT_PULLUP);
|
||||||
|
pinMode(TrackBallRight, INPUT_PULLUP);*/
|
||||||
|
|
||||||
|
//Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void lowerCpuFrequency() {
|
void lowerCpuFrequency() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue