-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
761 additions
and
415 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# trunk-ignore-all(trivy/DS026) | ||
# trunk-ignore-all(trivy/DS002) | ||
# trunk-ignore-all(checkov/CKV_DOCKER_2) | ||
# trunk-ignore-all(checkov/CKV_DOCKER_3) | ||
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12 | ||
|
||
# trunk-ignore(terrascan/AC_DOCKER_0002) | ||
# trunk-ignore(hadolint/DL3008) | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
ca-certificates \ | ||
git \ | ||
wget \ | ||
zip \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* |
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,37 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "Meshtastic Device-UI Dev", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}, | ||
"ghcr.io/devcontainers/features/node:1": {} | ||
}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"Trunk.io", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
"settings": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "trunk.io", | ||
"trunk.enableWindows": true, | ||
"files.insertFinalNewline": false, | ||
"files.trimFinalNewlines": false, | ||
"cmake.configureOnOpen": false, | ||
"[cpp]": { | ||
"editor.defaultFormatter": "trunk.io" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"postCreateCommand": "npm install lv_i18n -g --no-fund" | ||
} |
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,4 @@ | ||
trailingComma: es5 | ||
tabWidth: 2 | ||
semi: false | ||
singleQuote: true |
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 |
---|---|---|
|
@@ -2,44 +2,44 @@ | |
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml | ||
version: 0.1 | ||
cli: | ||
version: 1.21.0 | ||
version: 1.22.8 | ||
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v1.4.5 | ||
ref: v1.6.4 | ||
uri: https://github.com/trunk-io/plugins | ||
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) | ||
runtimes: | ||
# enabled: | ||
# - [email protected] | ||
# - [email protected] | ||
# - [email protected] | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) | ||
lint: | ||
enabled: | ||
- trufflehog@3.71.0 | ||
- trufflehog@3.83.4 | ||
- [email protected] | ||
- [email protected].8 | ||
- [email protected].60 | ||
- [email protected].1 | ||
- trivy@0.50.1 | ||
- [email protected].10 | ||
- [email protected].281 | ||
- [email protected].9 | ||
- trivy@0.56.2 | ||
#- [email protected] | ||
- taplo@0.8.1 | ||
- ruff@0.3.5 | ||
- taplo@0.9.3 | ||
- ruff@0.7.2 | ||
- [email protected] | ||
- markdownlint@0.39.0 | ||
- oxipng@9.0.0 | ||
- svgo@3.2.0 | ||
- actionlint@1.6.27 | ||
- flake8@7.0.0 | ||
- markdownlint@0.42.0 | ||
- oxipng@9.1.2 | ||
- svgo@3.3.2 | ||
- actionlint@1.7.4 | ||
- flake8@7.1.1 | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- black@24.3.0 | ||
- black@24.10.0 | ||
- git-diff-check | ||
- gitleaks@8.18.2 | ||
- gitleaks@8.21.1 | ||
- [email protected] | ||
- prettier@3.2.5 | ||
- prettier@3.3.3 | ||
ignore: | ||
- linters: [ALL] | ||
paths: | ||
|
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,5 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format. | ||
"recommendations": ["Trunk.io"] | ||
} |
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,13 @@ | ||
{ | ||
// See https://code.visualstudio.com/docs/getstarted/settings#_settings-json-file | ||
// for the documentation about the settings.json format. | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "trunk.io", | ||
"trunk.enableWindows": true, | ||
"files.insertFinalNewline": false, | ||
"files.trimFinalNewlines": false, | ||
"cmake.configureOnOpen": false, | ||
"[cpp]": { | ||
"editor.defaultFormatter": "trunk.io" | ||
} | ||
} |
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
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,121 @@ | ||
#pragma once | ||
#define LGFX_USE_V1 | ||
|
||
#include <LovyanGFX.hpp> | ||
#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp> | ||
#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp> | ||
|
||
class LGFX_MAKERFABS480X480 : public lgfx::LGFX_Device | ||
{ | ||
lgfx::Panel_ST7701 _panel_instance; | ||
lgfx::Bus_RGB _bus_instance; | ||
lgfx::Light_PWM _light_instance; | ||
lgfx::Touch_GT911 _touch_instance; | ||
|
||
public: | ||
const uint16_t screenWidth = 480; | ||
const uint16_t screenHeight = 480; | ||
|
||
bool hasButton(void) { return false; } | ||
|
||
LGFX_MAKERFABS480X480(void) | ||
{ | ||
{ | ||
auto cfg = _panel_instance.config(); | ||
cfg.memory_width = 480; | ||
cfg.memory_height = 480; | ||
cfg.panel_width = screenWidth; | ||
cfg.panel_height = screenHeight; | ||
cfg.offset_x = 0; | ||
cfg.offset_y = 0; | ||
cfg.offset_rotation = 0; | ||
_panel_instance.config(cfg); | ||
} | ||
|
||
{ | ||
auto cfg = _panel_instance.config_detail(); | ||
cfg.pin_cs = 1; | ||
cfg.pin_sclk = 12; | ||
cfg.pin_mosi = 11; | ||
cfg.use_psram = 1; | ||
_panel_instance.config_detail(cfg); | ||
} | ||
|
||
{ | ||
auto cfg = _bus_instance.config(); | ||
cfg.panel = &_panel_instance; | ||
cfg.pin_d0 = GPIO_NUM_6; // B0 | ||
cfg.pin_d1 = GPIO_NUM_7; // B1 | ||
cfg.pin_d2 = GPIO_NUM_15; // B2 | ||
cfg.pin_d3 = GPIO_NUM_16; // B3 | ||
cfg.pin_d4 = GPIO_NUM_8; // B4 | ||
cfg.pin_d5 = GPIO_NUM_0; // G0 | ||
cfg.pin_d6 = GPIO_NUM_9; // G1 | ||
cfg.pin_d7 = GPIO_NUM_14; // G2 | ||
cfg.pin_d8 = GPIO_NUM_47; // G3 | ||
cfg.pin_d9 = GPIO_NUM_48; // G4 | ||
cfg.pin_d10 = GPIO_NUM_3; // G5 | ||
cfg.pin_d11 = GPIO_NUM_39; // R0 | ||
cfg.pin_d12 = GPIO_NUM_40; // R1 | ||
cfg.pin_d13 = GPIO_NUM_41; // R2 | ||
cfg.pin_d14 = GPIO_NUM_42; // R3 | ||
cfg.pin_d15 = GPIO_NUM_2; // R4 | ||
|
||
cfg.pin_henable = GPIO_NUM_45; | ||
cfg.pin_vsync = GPIO_NUM_4; | ||
cfg.pin_hsync = GPIO_NUM_5; | ||
cfg.pin_pclk = GPIO_NUM_21; | ||
cfg.freq_write = 14000000; | ||
|
||
cfg.hsync_polarity = 0; | ||
cfg.hsync_front_porch = 10; | ||
cfg.hsync_pulse_width = 8; | ||
cfg.hsync_back_porch = 50; | ||
|
||
cfg.vsync_polarity = 0; | ||
cfg.vsync_front_porch = 10; | ||
cfg.vsync_pulse_width = 8; | ||
cfg.vsync_back_porch = 20; | ||
|
||
cfg.pclk_active_neg = 0; | ||
cfg.pclk_idle_high = 0; | ||
cfg.de_idle_high = 1; | ||
|
||
_bus_instance.config(cfg); | ||
} | ||
_panel_instance.setBus(&_bus_instance); | ||
|
||
{ | ||
auto cfg = _light_instance.config(); | ||
cfg.pin_bl = 44; | ||
//cfg.freq = 80; // higher value decrease brightness | ||
_light_instance.config(cfg); | ||
} | ||
_panel_instance.light(&_light_instance); | ||
|
||
{ | ||
auto cfg = _touch_instance.config(); | ||
cfg.pin_cs = GPIO_NUM_NC; | ||
cfg.x_min = 0; | ||
cfg.x_max = 479; | ||
cfg.y_min = 0; | ||
cfg.y_max = 479; | ||
cfg.bus_shared = false; | ||
cfg.offset_rotation = 0; | ||
|
||
cfg.i2c_port = 1; | ||
cfg.i2c_addr = 0x5D; | ||
cfg.pin_int = GPIO_NUM_NC; | ||
cfg.pin_sda = GPIO_NUM_17; | ||
cfg.pin_scl = GPIO_NUM_18; | ||
cfg.pin_rst = GPIO_NUM_38; | ||
|
||
cfg.freq = 400000; | ||
_touch_instance.config(cfg); | ||
_panel_instance.setTouch(&_touch_instance); | ||
|
||
} | ||
|
||
setPanel(&_panel_instance); | ||
} | ||
}; |
Oops, something went wrong.