Skip to content

Commit

Permalink
- Moved board constants to platformio.ini
Browse files Browse the repository at this point in the history
- Updated MD with image T-Display-S3
  • Loading branch information
rzeldent committed Oct 22, 2023
1 parent 61807c1 commit 2c61ca2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ Internally there is a database with airport, aircraft and airline data with grap

This application retrieves the current flights near a configured location and displays them sequentially on the display.

![Example2](assets/20220909_221101.jpg)
![Example3](assets/20220909_221104.jpg)
![Example1](assets/20220909_221101.jpg)
![Example2](assets/20220909_221104.jpg)

Example of layout on LilyGo-T-Display-S3
![Example3](assets/20231022_000000.jpeg)

## History

| | |
| ----------- | -------------------------------------------------------------------- |
| :---------- | :------------------------------------------------------------------- |
| Oct 21 2023 | Added configuration from LilyGo-T-Display-S3 with help from ulihuber |
| Oct 25 2022 | Use LVGL for graphics |
| Oct 15 2022 | Filtering for airborne/grounded/gliders/vehicles |
Expand Down
Binary file added assets/20231022_000000.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions include/ttgo_display.h

This file was deleted.

15 changes: 14 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ monitor_filters = log2file, time, default
build_flags =
-O2
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
# GPIO of the buttons on the TTGO Display
-D GPIO_BUTTON_TOP=35
-D GPIO_BUTTON_BOTTOM=0
# SD Card definitions
-D SD_CARD_CS=33
-D SD_CARD_SCLK=25
-D SD_CARD_MISO=27
-D SD_CARD_MOSI=26
# ADC detection enable port and ADC GPIO
-D GPIO_ADC_EN=14
-D PIN_ADC=34
# TFT_eSPI settings
-D USER_SETUP_LOADED
-D ST7789_DRIVER
Expand Down Expand Up @@ -50,7 +61,6 @@ build_flags =
-D LV_CONF_PATH=${PROJECT_INCLUDE_DIR}/lv_conf.h
-D LV_HOR_RES_MAX=240
-D LV_VER_RES_MAX=135

lib_deps =
bodmer/TFT_eSPI@^2.5.33
lvgl/lvgl@^8.3.9
Expand Down Expand Up @@ -82,6 +92,9 @@ upload_protocol = esptool
build_flags =
-O2
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
# GPIO of the buttons on the TTGO Display
-D GPIO_BUTTON_TOP=14
-D GPIO_BUTTON_BOTTOM=0
# TFT_eSPI settings
-D USER_SETUP_LOADED=1
-D ST7789_DRIVER
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include <SPI.h>
#include <soc/rtc_cntl_reg.h>

#include <ttgo_display.h>

// Settings for the display are defined in platformio.ini
#include <TFT_eSPI.h>
#include <lvgl.h>
Expand Down Expand Up @@ -212,11 +210,13 @@ void setup()
// Disable brownout
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);

#ifdef GPIO_ADC_EN
// ADC_EN is the ADC detection enable port
// If the USB port is used for power supply, it is turned on by default.
// If it is powered by battery, it needs to be set to high level
pinMode(GPIO_ADC_EN, OUTPUT);
digitalWrite(GPIO_ADC_EN, HIGH);
#endif

log_i("CPU Freq = %d Mhz", getCpuFrequencyMhz());
log_i("Free heap: %d bytes", ESP.getFreeHeap());
Expand Down

0 comments on commit 2c61ca2

Please sign in to comment.