-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #745 from OpenEVSE/elecrow_esp32_hmi
OpenEVSE TFT LCD HMI support and initial TFT display POC
- Loading branch information
Showing
44 changed files
with
5,096 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,4 @@ lib/MicroTasks | |
*.bin | ||
divert_sim/epoxyfsdata | ||
divert_sim/epoxyeepromdata | ||
*.pem |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Submodule gui-v2
updated
4 files
+180 −0 | export-icons.js | |
+2,462 −140 | package-lock.json | |
+4 −1 | package.json | |
+2 −2 | src/lib/icons/icons.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Name, Type, SubType, Offset, Size, Flags | ||
nvs, data, nvs, 0x9000, 0x5000, | ||
otadata, data, ota, 0xe000, 0x2000, | ||
app0, app, ota_0, 0x10000, 0x640000, | ||
app1, app, ota_1, 0x650000,0x640000, | ||
spiffs, data, spiffs, 0xc90000,0x360000, | ||
coredump, data, coredump,0xFF0000,0x10000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ debug_flags = | |
#-D ENABLE_NOISY_PROFILE | ||
#-D ENABLE_DEBUG_MICROTASKS | ||
#-D ENABLE_DEBUG_ENERGY_METER | ||
#-D ENABLE_DEBUG_MEMORY_MONITOR | ||
src_build_flags = | ||
# -D ARDUINOJSON_USE_LONG_LONG | ||
# -D ENABLE_ASYNC_WIFI_SCAN | ||
|
@@ -99,11 +100,60 @@ build_flags = | |
-D USE_ESP32 | ||
-D USE_ESP32_FRAMEWORK_ARDUINO | ||
-D MG_MAX_HTTP_REQUEST_SIZE=8196 | ||
build_flags_openevse_tft = | ||
${common.build_flags} | ||
${common.src_build_flags} | ||
${common.gfx_display_build_flags} | ||
-D NEO_PIXEL_PIN=26 | ||
-D NEO_PIXEL_LENGTH=14 | ||
-D WIFI_PIXEL_NUMBER=1 | ||
-D WIFI_BUTTON=0 | ||
-D WIFI_BUTTON_PRESSED_STATE=LOW | ||
build_partitions = min_spiffs.csv | ||
build_partitions_debug = min_spiffs_debug.csv | ||
build_partitions_16mb = openevse_16mb.csv | ||
|
||
neopixel_lib = adafruit/Adafruit [email protected] | ||
|
||
gfx_display_libs = | ||
# lvgl/[email protected] | ||
bodmer/TFT_eSPI@^2.5.31 | ||
bitbank2/PNGdec@^1.0.1 | ||
SPI | ||
|
||
gfx_display_build_flags = | ||
# -D LV_CONF_INCLUDE_SIMPLE | ||
# -D LV_CONF_SUPPRESS_DEFINE_CHECK | ||
-D USER_SETUP_LOADED | ||
-D ILI9488_DRIVER | ||
-D TFT_WIDTH=320 | ||
-D TFT_HEIGHT=480 | ||
-D TFT_BL=27 | ||
-D TFT_MISO=12 | ||
-D TFT_MOSI=13 | ||
-D TFT_SCLK=14 | ||
-D TFT_CS=15 | ||
-D TFT_DC=2 | ||
-D TFT_RST=-1 | ||
-D TOUCH_CS=33 | ||
# -D LOAD_GLCD | ||
# -D LOAD_FONT2 | ||
# -D LOAD_FONT4 | ||
# -D LOAD_FONT6 | ||
# -D LOAD_FONT7 | ||
# -D LOAD_FONT8 | ||
-D LOAD_GFXFF | ||
# -D SMOOTH_FONT | ||
# -D SPI_FREQUENCY=15999999 | ||
# -D SPI_FREQUENCY=20000000 | ||
# -D SPI_FREQUENCY=27000000 | ||
-D SPI_FREQUENCY=40000000 | ||
# -D SPI_FREQUENCY=55000000 | ||
# -D SPI_FREQUENCY=65000000 | ||
# -D SPI_FREQUENCY=80000000 | ||
-D SPI_READ_FREQUENCY=20000000 | ||
-D SPI_TOUCH_FREQUENCY=600000 | ||
-D ENABLE_SCREEN_LCD_TFT | ||
|
||
[env] | ||
# specify exact Arduino ESP SDK version, requires platformio 3.5+ (curently dev version) | ||
|
@@ -358,3 +408,53 @@ build_flags = | |
-D NEO_PIXEL_PIN=8 | ||
-D NEO_PIXEL_LENGTH=1 | ||
-D WIFI_PIXEL_NUMBER=1 | ||
|
||
[env:elecrow_esp32_hmi] | ||
board = denky32 | ||
build_flags = | ||
${common.build_flags} | ||
${common.src_build_flags} | ||
-D DEBUG_PORT=Serial | ||
-D RAPI_PORT=Serial1 | ||
-D RX1=16 | ||
-D TX1=17 | ||
lib_deps = | ||
${common.lib_deps} | ||
${common.gfx_display_libs} | ||
|
||
[env:elecrow_esp32_hmi_dev] | ||
extends = env:elecrow_esp32_hmi | ||
build_flags = | ||
${env:elecrow_esp32_hmi.build_flags} | ||
${common.debug_flags} | ||
${common.gfx_display_build_flags} | ||
upload_protocol = custom | ||
upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update | ||
#build_type = debug | ||
#board_build.partitions = ${common.build_partitions_debug} | ||
|
||
[env:openevse_wifi_tft_v1] | ||
board = denky32 | ||
build_flags = | ||
${common.build_flags_openevse_tft} | ||
-D DEBUG_PORT=Serial2 | ||
-D RAPI_PORT=Serial | ||
lib_deps = | ||
${common.lib_deps} | ||
${common.gfx_display_libs} | ||
${common.neopixel_lib} | ||
board_build.partitions = ${common.build_partitions_16mb} | ||
board_upload.flash_size = 16MB | ||
board_build.flash_mode = qio | ||
board_build.f_flash = 80000000L | ||
|
||
[env:openevse_wifi_tft_v1_dev] | ||
extends = env:openevse_wifi_tft_v1 | ||
build_flags = | ||
${common.build_flags_openevse_tft} | ||
${common.debug_flags} | ||
-D DEBUG_PORT=Serial | ||
-D RAPI_PORT=Serial2 | ||
#upload_protocol = custom | ||
#upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update | ||
build_type = debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#if defined(ENABLE_DEBUG) && !defined(ENABLE_DEBUG_EMBEDDED_FILES) | ||
#undef ENABLE_DEBUG | ||
#endif | ||
|
||
#include "embedded_files.h" | ||
#include "emonesp.h" | ||
|
||
bool embedded_get_file(String filename, StaticFile *index, size_t length, StaticFile **file) | ||
{ | ||
DBUGF("Looking for %s", filename.c_str()); | ||
|
||
for(int i = 0; i < length; i++) | ||
{ | ||
if(filename == index[i].filename) | ||
{ | ||
DBUGF("Found %s %d@%p", index[i].filename, index[i].length, index[i].data); | ||
|
||
if(file) { | ||
*file = &index[i]; | ||
} | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef EMBEDDED_FILES_H | ||
#define EMBEDDED_FILES_H | ||
|
||
#include <Arduino.h> | ||
|
||
#define ARRAY_LENGTH(x) (sizeof(x)/sizeof((x)[0])) | ||
|
||
#define IS_ALIGNED(x) (0 == ((uint32_t)(x) & 0x3)) | ||
|
||
struct StaticFile | ||
{ | ||
const char *filename; | ||
const char *data; | ||
size_t length; | ||
const char *type; | ||
const char *etag; | ||
bool compressed; | ||
}; | ||
|
||
bool embedded_get_file(String filename, StaticFile *index, size_t length, StaticFile **file); | ||
|
||
#endif // EMBEDDED_FILES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.