forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 56
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
72 changed files
with
1,576 additions
and
1,091 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## ⚡ Breaking Changes", | ||
"labels": [ | ||
"breaking change" | ||
] | ||
}, | ||
{ | ||
"title": "## 🚀 Features", | ||
"labels": [ | ||
"feature" | ||
] | ||
}, | ||
{ | ||
"title": "## 🐛 Fixes", | ||
"labels": [ | ||
"fix" | ||
] | ||
}, | ||
{ | ||
"title": "## 📚 Documentation", | ||
"labels": [ | ||
"doc" | ||
] | ||
}, | ||
{ | ||
"title": "## 🛠 Under the hood", | ||
"labels": [] | ||
} | ||
], | ||
"template": "${{CHANGELOG}}", | ||
"pr_template": "- [${{TITLE}}](https://github.com/tbnobody/OpenDTU/commit/${{MERGE_SHA}})", | ||
"empty_template": "- no changes", | ||
"label_extractor": [ | ||
{ | ||
"pattern": "(.): (.+)", | ||
"target": "$1" | ||
} | ||
], | ||
"tag_resolver": { | ||
"method": "sort" | ||
} | ||
} |
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,22 @@ | ||
name: Yarn Linting | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js and yarn | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
cache-dependency-path: "webapp/yarn.lock" | ||
|
||
- name: Install WebApp dependencies | ||
run: yarn --cwd webapp install --frozen-lockfile | ||
|
||
- name: Linting | ||
run: yarn --cwd webapp lint |
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,64 @@ | ||
[ | ||
{ | ||
"name": "LEDs, Display", | ||
"nrf24": { | ||
"miso": 19, | ||
"mosi": 23, | ||
"clk": 18, | ||
"irq": 16, | ||
"en": 4, | ||
"cs": 5 | ||
}, | ||
"display": { | ||
"type": 3, | ||
"data": 21, | ||
"clk": 22 | ||
}, | ||
"led": { | ||
"led0": 25, | ||
"led1": 26 | ||
} | ||
}, | ||
{ | ||
"name": "Only Display", | ||
"nrf24": { | ||
"miso": 19, | ||
"mosi": 23, | ||
"clk": 18, | ||
"irq": 16, | ||
"en": 4, | ||
"cs": 5 | ||
}, | ||
"display": { | ||
"type": 3, | ||
"data": 21, | ||
"clk": 22 | ||
} | ||
}, | ||
{ | ||
"name": "Only LEDs", | ||
"nrf24": { | ||
"miso": 19, | ||
"mosi": 23, | ||
"clk": 18, | ||
"irq": 16, | ||
"en": 4, | ||
"cs": 5 | ||
}, | ||
"led": { | ||
"led0": 25, | ||
"led1": 26 | ||
} | ||
}, | ||
{ | ||
"name": "No Output", | ||
"nrf24": { | ||
"miso": 19, | ||
"mosi": 23, | ||
"clk": 18, | ||
"irq": 16, | ||
"en": 4, | ||
"cs": 5 | ||
} | ||
} | ||
] |
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,35 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "PinMapping.h" | ||
#include <TimeoutHelper.h> | ||
|
||
#define LEDSINGLE_UPDATE_INTERVAL 2000 | ||
|
||
enum eLedFunction { | ||
CONNECTED_NETWORK, | ||
CONNECTED_MQTT, | ||
INV_REACHABLE, | ||
INV_PRODUCING, | ||
}; | ||
|
||
class LedSingleClass { | ||
public: | ||
LedSingleClass(); | ||
void init(); | ||
void loop(); | ||
|
||
private: | ||
enum class LedState_t { | ||
On, | ||
Off, | ||
Blink, | ||
}; | ||
|
||
LedState_t _ledState[PINMAPPING_LED_COUNT]; | ||
TimeoutHelper _updateTimeout; | ||
TimeoutHelper _blinkTimeout; | ||
uint8_t _ledActive = 0; | ||
}; | ||
|
||
extern LedSingleClass LedSingle; |
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
Oops, something went wrong.