Skip to content

Commit

Permalink
SkyView: misc. update for revision 2.8 of TTGO T5S ESP32 e-Paper dev.…
Browse files Browse the repository at this point in the history
… board [skip ci]
  • Loading branch information
lyusupov committed Jul 4, 2020
1 parent 0c444c5 commit 669bf10
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions software/firmware/source/SkyView/BatteryHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ void Battery_setup()

void Battery_loop()
{
if (hw_info.model == SOFTRF_MODEL_SKYVIEW &&
hw_info.revision == HW_REV_T5S_1_9) {
if ( hw_info.model == SOFTRF_MODEL_SKYVIEW &&
(hw_info.revision == HW_REV_T5S_1_9 || hw_info.revision == HW_REV_T5S_2_8)) {
if (isTimeToBattery()) {
float voltage = Battery_voltage();

Expand Down
2 changes: 1 addition & 1 deletion software/firmware/source/SkyView/EPDHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ byte EPD_setup(bool splash_screen)
display->setCursor(x, y);
display->print(EPD_SkyView_text4);

if (hw_info.revision == HW_REV_T5S_1_9) {
if (hw_info.revision == HW_REV_T5S_1_9 || hw_info.revision == HW_REV_T5S_2_8) {
display->getTextBounds(EPD_SkyView_text5, 0, 0, &tbx5, &tby5, &tbw5, &tbh5);
x = (display->width() - tbw5) / 2;
y += tbh4;
Expand Down
22 changes: 15 additions & 7 deletions software/firmware/source/SkyView/Platform_ESP32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,18 @@ static void ESP32_setup()
uint32_t flash_id = ESP32_getFlashId();

/*
* Board | Module | Flash memory IC
* -----------------+------------+--------------------
* DoIt ESP32 | WROOM | GIGADEVICE_GD25Q32
* TTGO LoRa32 V2.0 | PICO-D4 IC | GIGADEVICE_GD25Q32
* TTGO T-Beam V06 | | WINBOND_NEX_W25Q32_V
* TTGO T8 V1.8 | WROVER | GIGADEVICE_GD25LQ32
* TTGO T5S V1.9 | | WINBOND_NEX_W25Q32_V
* Board | Module | Flash memory IC
* ----------------+------------+--------------------
* DoIt ESP32 | WROOM | GIGADEVICE_GD25Q32
* TTGO T3 V2.0 | PICO-D4 IC | GIGADEVICE_GD25Q32
* TTGO T3 V2.1.6 | PICO-D4 IC | GIGADEVICE_GD25Q32
* TTGO T22 V06 | | WINBOND_NEX_W25Q32_V
* TTGO T22 V08 | | WINBOND_NEX_W25Q32_V
* TTGO T22 V11 | | BOYA_BY25Q32AL
* TTGO T8 V1.8 | WROVER | GIGADEVICE_GD25LQ32
* TTGO T5S V1.9 | | WINBOND_NEX_W25Q32_V
* TTGO T5S V2.8 | | BOYA_BY25Q32AL
* TTGO T-Watch | | WINBOND_NEX_W25Q128_V
*/

if (psramFound()) {
Expand All @@ -254,6 +259,9 @@ static void ESP32_setup()
case MakeFlashId(WINBOND_NEX_ID, WINBOND_NEX_W25Q32_V):
hw_info.revision = HW_REV_T5S_1_9;
break;
case MakeFlashId(BOYA_ID, BOYA_BY25Q32AL):
hw_info.revision = HW_REV_T5S_2_8;
break;
default:
hw_info.revision = HW_REV_UNKNOWN;
break;
Expand Down
4 changes: 4 additions & 0 deletions software/firmware/source/SkyView/Platform_ESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
/* TTGO T5S green LED mapping */
#define SOC_GPIO_PIN_LED_T5S 22

/* Boya Microelectronics Inc. */
#define BOYA_ID 0x68
#define BOYA_BY25Q32AL 0x4016

#define MakeFlashId(v,d) ((v << 16) | d)
#define CCCC(c1, c2, c3, c4) ((c4 << 24) | (c3 << 16) | (c2 << 8) | c1)

Expand Down
1 change: 1 addition & 0 deletions software/firmware/source/SkyView/SkyView.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ enum
HW_REV_UNKNOWN,
HW_REV_DEVKIT,
HW_REV_T5S_1_9,
HW_REV_T5S_2_8,
HW_REV_T8_1_8
};

Expand Down
3 changes: 2 additions & 1 deletion software/firmware/source/SoftRF/Platform_ESP32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ static void ESP32_setup()
* TTGO T22 V11 | | BOYA_BY25Q32AL
* TTGO T8 V1.8 | WROVER | GIGADEVICE_GD25LQ32
* TTGO T5S V1.9 | | WINBOND_NEX_W25Q32_V
* TTGO T5S V2.8 | | BOYA_BY25Q32AL
* TTGO T-Watch | | WINBOND_NEX_W25Q128_V
*/

Expand Down Expand Up @@ -1067,7 +1068,7 @@ static bool ESP32_Baro_setup()
}

#if DEBUG
Serial.println(F("INFO: RESET pin of SX1276 radio is not connected to MCU."));
Serial.println(F("INFO: RESET pin of SX12xx radio is not connected to MCU."));
#endif

/* Pre-init 1st ESP32 I2C bus to stick on these pins */
Expand Down

0 comments on commit 669bf10

Please sign in to comment.