Skip to content

Commit

Permalink
[Global] Minor All-Around Cleanup (#590)
Browse files Browse the repository at this point in the history
* new pr: squashing commits of dev-cleanup

* fixed conflicts

* Platform IO stage

* missed 2.

* some fixes.

* refactor timer setup and fix misaligned setting underline

* new pr: squashing commits of dev-cleanup

* fixed conflicts

* Platform IO stage

* missed 2.

* some fixes.

* fixes

* oops

* fixes

* relocate MII.h

* cleanup

* fix

* add cache?

* testing the cache

* Wrap

* cache

* Add information on how to create new devices

* Added layout

* change to readme

* oops

* add more device information

* added Central Timezone

* shrunk the wifi icon to look better

* Dev Info - Fuel Gauge

* battery stuff

* Battery stuff

* fix(ir_read.cpp): resume irrecv after device save

* fix(custom_ir.cpp): remove spaces from NEC address and command

* fix(sirc): fix SIRC (Sony) protocol

* RAW RF enhancement and IR custom little fix

* pcbs! merry xmas every1

* fixed md

* small little fixes

* fix ir_read.cpp 

ir reader fix, now raw is forced and sending works without problems.

* Fix fo RcStiwch decoded saved signals
This issue appeared 3 commits before

* Updated comment language ir-read.cpp

* Update comm. lang. ir_read.cpp

* Add Mifare Ultralight Tag read and write with PN532 BLE.

* Rebase

* Fixed #590 (comment)

* #590 (comment)
Fix

* Fixes

---------

Co-authored-by: Cody Ardoin <[email protected]>
Co-authored-by: Rennan Cockles <[email protected]>
Co-authored-by: Lamn <[email protected]>
Co-authored-by: Pirata <[email protected]>
Co-authored-by: Pirata <[email protected]>
Co-authored-by: pr3y <[email protected]>
Co-authored-by: pr3y <[email protected]>
Co-authored-by: MayLaOwn <[email protected]>
Co-authored-by: whywilson <[email protected]>
  • Loading branch information
10 people authored Dec 28, 2024
1 parent aa560a2 commit 9a8389a
Show file tree
Hide file tree
Showing 222 changed files with 7,439 additions and 4,571 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/PR_All_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,25 @@

- id: build
name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
key: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}
restore-keys: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}

- name: Install Dependencies
run: |
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/PR_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,26 @@

- id: build
name: setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.x"


- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
key: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}
restore-keys: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}

- name: Install dependencies
run: |
pip install requests esptool
Expand All @@ -89,7 +105,7 @@
- name: Run Compile
run: |
platformio run -e ${{ matrix.board.env }}
- name: Merge files
run: |
esptool.py --chip esp32s3 merge_bin -o Bruce-${{ matrix.board.env }}.bin \
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/buil_parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,22 @@
with:
python-version: "3.x"

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
key: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}
restore-keys: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}

- name: Install dependencies
run: |
pip install requests esptool
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,26 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
key: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}
restore-keys: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}

- name: Install dependencies
run: pip install requests esptool

Expand Down
24 changes: 24 additions & 0 deletions LAYOUT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
```
.
├── boards
│ ├── [board]
│ │ └── interface.cpp
│ ├── pinouts
│ │ ├── pins_arduino.h
│ │ └── [board].h
│ ├── [board].json
│ └── [board].ini
├── html
├── media
├── lib
│ ├── utility
│ └─ ...
├── include
│ └─ ...
├── src
│ ├── core
│ ├── modules
│ └── main.cpp
├── test
└── platformio.ini
```
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ Other media can be [found here](./media/).
+ [@Luidiblu](https://github.com/Luidiblu) for logo and UI design assistance.
+ [@eadmaster](https://github.com/eadmaster) for adding a lot of features.
+ [@rennancockles](https://github.com/rennancockles) for a lot of RFID code, refactoring and others features.
+ [@7h30th3r0n3](https://github.com/7h30th3r0n3) refactoring and a lot of help with WiFi attacks.
+ [Smoochiee]() for Bruce PCB design.
+ [TH3_KR4K3N]() for Stick cplus extender PCB design.
+ Everyone who contributed in some way to the project, thanks :heart:

## :construction: Disclaimer
Expand Down
42 changes: 21 additions & 21 deletions ports/CYD-2432S028/platformio.ini → boards/CYD-2432S028.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@

##################################### CYD MODELS ####################################################
[env:CYD-2432S028]
platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0.0.4/platform-espressif32.zip
board = esp32dev
board = CYD-2432S028
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
framework = arduino
board_build.partitions = custom_4Mb_full.csv
build_src_filter =${env.build_src_filter} +<../ports/CYD-2432S028>
build_src_filter =${env.build_src_filter} +<../boards/CYD-2432S028>
build_flags =
${env.build_flags}
-Iports/CYD-2432S028
-Iboards/CYD-2432S028
-Os
-DCORE_DEBUG_LEVEL=5
;-DARDUINO_USB_CDC_ON_BOOT=1 ; Used only in ESP32-S3 to make Serial Comands work
Expand Down Expand Up @@ -112,15 +109,15 @@ build_flags =
;Screen Setup
-DHAS_SCREEN=1
-DROTATION=1
-DWIDTH=320
-DHEIGHT=220 ;240-20 lower margin
-DBACKLIGHT=21
-DMINBRIGHT=160

;TFT_eSPI Setup
-DUSER_SETUP_LOADED=1
-DILI9341_2_DRIVER=1
-DUSE_HSPI_PORT=1
-DTFT_HEIGHT=320
-DTFT_WIDTH=240 ;240-20 lower margin
-DTFT_MISO=12
-DTFT_MOSI=13
-DTFT_SCLK=14
Expand Down Expand Up @@ -174,6 +171,15 @@ build_flags =
${env:CYD-2432S028.build_flags}
-DTFT_INVERSION_ON

[env:LAUNCHER_CYD-2USB]
extends=env:CYD-2432S028
build_flags =
${env:CYD-2432S028.build_flags}
-DTFT_INVERSION_ON
-DLITE_VERSION=1



[env:CYD-2432W328C]
extends = env:CYD-2432S028
build_flags =
Expand All @@ -185,6 +191,13 @@ build_flags =
-DSPI_TOUCH_FREQUENCY=2500000
-DHAS_CAPACITIVE_TOUCH=1

[env:LAUNCHER_CYD-2432S028]
extends=env:CYD-2432S028
build_flags =
${env:CYD-2432S028.build_flags}
-DLITE_VERSION=1


[env:CYD-2432W328C_2] # commom to CYD-2432S024 Capacitive board
extends = env:CYD-2432S028
build_flags =
Expand All @@ -196,19 +209,6 @@ build_flags =
-DSPI_TOUCH_FREQUENCY=2500000
-DHAS_CAPACITIVE_TOUCH=1

[env:LAUNCHER_CYD-2432S028]
extends=env:CYD-2432S028
build_flags =
${env:CYD-2432S028.build_flags}
-DLITE_VERSION=1

[env:LAUNCHER_CYD-2USB]
extends=env:CYD-2432S028
build_flags =
${env:CYD-2432S028.build_flags}
-DTFT_INVERSION_ON
-DLITE_VERSION=1

[env:LAUNCHER_CYD-2432W328C]
extends=env:CYD-2432S028
build_flags =
Expand Down
40 changes: 40 additions & 0 deletions boards/CYD-2432S028.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"arduino": {
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": [
"-DARDUINO_ESP32_DEV",
"-DCYD_2432S028"
],
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "pinouts"
},
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
],
"debug": {
"openocd_board": "esp-wroom-32.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "Espressif ESP32 Dev Module",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://en.wikipedia.org/wiki/ESP32",
"vendor": "Espressif"
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,19 @@ bool menuPress(int bot) {
//0 - prev
//1 - Sel
//2 - next
int terco=WIDTH/3;
int terco=tftWidth/3;
if (touch.touched()) { //touch.tirqTouched() &&
auto t = touch.getPointScaled();
t = touch.getPointScaled();
//log_i("Touchscreen Pressed at x=%d, y=%d, z=%d", t.x,t.y,t.z);
if(bruceConfig.rotation==3) {
t.y = (HEIGHT+20)-t.y;
t.x = WIDTH-t.x;
t.y = (tftHeight+20)-t.y;
t.x = tftWidth-t.x;
}

if(t.y>(HEIGHT) && ((t.x>terco*bot && t.x<terco*(1+bot)) || bot==ALL)) {
t.x=WIDTH+1;
t.y=HEIGHT+11;
if(t.y>(tftHeight) && ((t.x>terco*bot && t.x<terco*(1+bot)) || bot==ALL)) {
t.x=tftWidth+1;
t.y=tftHeight+11;
return true;
} else return false;
} else return false;
Expand Down Expand Up @@ -294,8 +294,8 @@ String keyboard(String mytext, int maxSize, String msg) {
{ '/', '/' } //12
}
};
int _x = WIDTH/12;
int _y = (HEIGHT - 54)/4;
int _x = tftWidth/12;
int _y = (tftHeight - 54)/4;
int _xo = _x/2-3;

int k=0;
Expand Down Expand Up @@ -344,7 +344,7 @@ String keyboard(String mytext, int maxSize, String msg) {
box_list[k].color = ~bruceConfig.bgColor;
box_list[k].x=159;
box_list[k].y=0;
box_list[k].w=WIDTH-164;
box_list[k].w=tftWidth-164;
box_list[k].h=22;

k=0;
Expand All @@ -366,12 +366,12 @@ String keyboard(String mytext, int maxSize, String msg) {

//Draw the rectangles
if(y<0) {
tft.fillRect(0,1,WIDTH,22,bruceConfig.bgColor);
tft.fillRect(0,1,tftWidth,22,bruceConfig.bgColor);
tft.drawRect(7,2,46,20,TFT_WHITE); // Ok Rectangle
tft.drawRect(55,2,50,20,TFT_WHITE); // CAP Rectangle
tft.drawRect(107,2,50,20,TFT_WHITE); // DEL Rectangle
tft.drawRect(159,2,74,20,TFT_WHITE); // SPACE Rectangle
tft.drawRect(3,32,WIDTH-3,20,bruceConfig.priColor); // mystring Rectangle
tft.drawRect(3,32,tftWidth-3,20,bruceConfig.priColor); // mystring Rectangle


if(x==0 && y==-1) { tft.setTextColor(bruceConfig.bgColor, TFT_WHITE); tft.fillRect(7,2,50,20,TFT_WHITE); }
Expand Down Expand Up @@ -401,7 +401,7 @@ String keyboard(String mytext, int maxSize, String msg) {
tft.setTextSize(FM);

// reseta o quadrado do texto
if (mytext.length() == 19 || mytext.length() == 20 || mytext.length() == 38 || mytext.length() == 39) tft.fillRect(3,32,WIDTH-3,20,bruceConfig.bgColor); // mystring Rectangle
if (mytext.length() == 19 || mytext.length() == 20 || mytext.length() == 38 || mytext.length() == 39) tft.fillRect(3,32,tftWidth-3,20,bruceConfig.bgColor); // mystring Rectangle
// escreve o texto
tft.setTextColor(TFT_WHITE);
if(mytext.length()>19) {
Expand All @@ -417,7 +417,7 @@ String keyboard(String mytext, int maxSize, String msg) {
tft.drawString(mytext, 5, 34);
}
//desenha o retangulo colorido
tft.drawRect(3,32,WIDTH-3,20,bruceConfig.priColor); // mystring Rectangle
tft.drawRect(3,32,tftWidth-3,20,bruceConfig.priColor); // mystring Rectangle


tft.setTextColor(TFT_WHITE, bruceConfig.bgColor);
Expand Down Expand Up @@ -469,11 +469,11 @@ String keyboard(String mytext, int maxSize, String msg) {

auto t = touch.getPointScaled();
if(bruceConfig.rotation==3) {
t.y = (HEIGHT+20)-t.y;
t.x = WIDTH-t.x;
t.y = (tftHeight+20)-t.y;
t.x = tftWidth-t.x;
}
if (box_list[48].contain(t.x, t.y)) { break; } // Ok
if (box_list[49].contain(t.x, t.y)) { caps=!caps; tft.fillRect(0,54,WIDTH,HEIGHT-54,bruceConfig.bgColor); goto THIS_END; } // CAP
if (box_list[49].contain(t.x, t.y)) { caps=!caps; tft.fillRect(0,54,tftWidth,tftHeight-54,bruceConfig.bgColor); goto THIS_END; } // CAP
if (box_list[50].contain(t.x, t.y)) goto DEL; // DEL
if (box_list[51].contain(t.x, t.y)) { mytext += box_list[51].key; goto ADD; } // SPACE
for(k=0;k<48;k++){
Expand Down Expand Up @@ -544,7 +544,7 @@ String keyboard(String mytext, int maxSize, String msg) {
}

//Resets screen when finished writing
tft.fillRect(0,0,WIDTH,HEIGHT,bruceConfig.bgColor);
tft.fillRect(0,0,tftWidth,tftHeight,bruceConfig.bgColor);
resetTftDisplay();

return mytext;
Expand Down
Loading

0 comments on commit 9a8389a

Please sign in to comment.