Skip to content

Commit

Permalink
Merge pull request #344 from rliegmann/main
Browse files Browse the repository at this point in the history
Fix ESP32 Pin Definition
  • Loading branch information
foorschtbar authored Mar 12, 2024
2 parents 4bb6528 + c8919e8 commit bd3b334
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Set up Python 🐍
uses: actions/setup-python@v4
uses: actions/setup-python@v5

- name: Download WebUI artifacts 💾
uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ Thanks to these great people for supporting this project.
<sub><b>miccgn</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/jekader">
<img src="https://avatars.githubusercontent.com/u/2088123?v=4" width="100;" alt="jekader"/>
<br />
<sub><b>jekader</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Metaln00b">
<img src="https://avatars.githubusercontent.com/u/25951169?v=4" width="100;" alt="Metaln00b"/>
Expand All @@ -69,13 +76,6 @@ Thanks to these great people for supporting this project.
<br />
<sub><b>pplucky</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/jekader">
<img src="https://avatars.githubusercontent.com/u/2088123?v=4" width="100;" alt="jekader"/>
<br />
<sub><b>jekader</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
Expand Down Expand Up @@ -131,7 +131,7 @@ Thanks to these great people for supporting this project.

<!-- ** WORK IN PROGRESS ** -->

### WORK IN PROGRESS
### 2.5.0 (2023-11-20)

- (foorschtbar) Fixes "MQTT message is to long" [[#322](https://github.com/pixelit-project/PixelIt/issues/322)]
- (o0shojo0o) Adjustments in the WebUI for the new API structure of the UserMap endpoint
Expand Down
14 changes: 7 additions & 7 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ build_flags =
-DMATRIX_HEIGHT=8 ; Pixel rows
esp32_build_flags =
${common.build_flags}
-DLDR_PIN=A0
-DLDR_PIN=34
-DMATRIX_PIN=27
-DDEFAULT_PIN_SCL="Pin_D1"
-DDEFAULT_PIN_SDA="Pin_D3"
-DDEFAULT_PIN_DFPRX="Pin_D7"
-DDEFAULT_PIN_DFPTX="Pin_D8"
-DDEFAULT_PIN_ONEWIRE="Pin_D1"
-DDEFAULT_PIN_SCL="GPIO_NUM_22"
-DDEFAULT_PIN_SDA="GPIO_NUM_21"
-DDEFAULT_PIN_DFPRX="GPIO_NUM_17"
-DDEFAULT_PIN_DFPTX="GPIO_NUM_16"
-DDEFAULT_PIN_ONEWIRE="GPIO_NUM_16"
-DDEFAULT_MATRIX_TYPE=1
-DDEFAULT_LDR=GL5516
-DVBAT_PIN=0
-DVBAT_PIN=33
esp8266_build_flags =
${common.build_flags}
-DLDR_PIN=A0
Expand Down
30 changes: 15 additions & 15 deletions src/PixelIt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3497,36 +3497,36 @@ uint8_t TranslatePin(String pin)
#elif defined(ESP32)

if (pin == "GPIO_NUM_14")
return GPIO_NUM_14;
return (int)GPIO_NUM_14;
if (pin == "GPIO_NUM_15")
return GPIO_NUM_15;
return (int)GPIO_NUM_15;
if (pin == "GPIO_NUM_16")
return GPIO_NUM_16;
return (int)GPIO_NUM_16;
if (pin == "GPIO_NUM_17")
return GPIO_NUM_17;
return (int)GPIO_NUM_17;
if (pin == "GPIO_NUM_18")
return GPIO_NUM_18;
return (int)GPIO_NUM_18;
if (pin == "GPIO_NUM_19")
return GPIO_NUM_19;
return (int)GPIO_NUM_19;
if (pin == "GPIO_NUM_21")
return GPIO_NUM_21;
return (int)GPIO_NUM_21;
if (pin == "GPIO_NUM_22")
return GPIO_NUM_22;
return (int)GPIO_NUM_22;
if (pin == "GPIO_NUM_23")
return GPIO_NUM_23;
return (int)GPIO_NUM_23;
if (pin == "GPIO_NUM_25")
return GPIO_NUM_25;
return (int)GPIO_NUM_25;
if (pin == "GPIO_NUM_26")
return GPIO_NUM_26;
return (int)GPIO_NUM_26;
if (pin == "GPIO_NUM_27")
return GPIO_NUM_27;
return (int)GPIO_NUM_27;
if (pin == "SPI_CLK_GPIO_NUM")
return SPI_CLK_GPIO_NUM;
return (int)SPI_CLK_GPIO_NUM;
if (pin == "SPI_CS0_GPIO_NUM")
return SPI_CS0_GPIO_NUM;
return (int)SPI_CS0_GPIO_NUM;

Log(F("Pin assignment - unknown pin"), pin);
return GPIO_NUM_32; // IDK
return (int)GPIO_NUM_32; // IDK
#endif
}

Expand Down

0 comments on commit bd3b334

Please sign in to comment.