forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
83 changed files
with
950 additions
and
1,050 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,47 @@ | ||
[ | ||
{ | ||
"name": "Olimex ESP32-Gateway", | ||
"nrf24": { | ||
"miso": 14, | ||
"mosi": 13, | ||
"clk": 12, | ||
"irq": 15, | ||
"en": 2, | ||
"cs": 4 | ||
}, | ||
"eth": { | ||
"enabled": true, | ||
"phy_addr": 0, | ||
"power": 12, | ||
"mdc": 23, | ||
"mdio": 18, | ||
"type": 0, | ||
"clk_mode": 3 | ||
} | ||
}, | ||
{ | ||
"name": "Olimex ESP32-Gateway with SSH1106", | ||
"nrf24": { | ||
"miso": 14, | ||
"mosi": 13, | ||
"clk": 12, | ||
"irq": 15, | ||
"en": 2, | ||
"cs": 4 | ||
}, | ||
"eth": { | ||
"enabled": true, | ||
"phy_addr": 0, | ||
"power": 12, | ||
"mdc": 23, | ||
"mdio": 18, | ||
"type": 0, | ||
"clk_mode": 3 | ||
}, | ||
"display": { | ||
"type": 3, | ||
"data": 32, | ||
"clk": 16 | ||
} | ||
} | ||
] |
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 |
---|---|---|
@@ -1,33 +1,34 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include <AsyncWebSocket.h> | ||
#include <HardwareSerial.h> | ||
#include <Stream.h> | ||
#include <TaskSchedulerDeclarations.h> | ||
#include <mutex> | ||
|
||
#define BUFFER_SIZE 500 | ||
|
||
class MessageOutputClass : public Print { | ||
public: | ||
void init(Scheduler& scheduler); | ||
size_t write(uint8_t c) override; | ||
size_t write(const uint8_t* buffer, size_t size) override; | ||
void register_ws_output(AsyncWebSocket* output); | ||
|
||
private: | ||
void loop(); | ||
|
||
Task _loopTask; | ||
|
||
AsyncWebSocket* _ws = nullptr; | ||
char _buffer[BUFFER_SIZE]; | ||
uint16_t _buff_pos = 0; | ||
uint32_t _lastSend = 0; | ||
bool _forceSend = false; | ||
|
||
std::mutex _msgLock; | ||
}; | ||
|
||
extern MessageOutputClass MessageOutput; | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include <AsyncWebSocket.h> | ||
#include <HardwareSerial.h> | ||
#include <Stream.h> | ||
#include <TaskSchedulerDeclarations.h> | ||
#include <mutex> | ||
|
||
#define BUFFER_SIZE 500 | ||
|
||
class MessageOutputClass : public Print { | ||
public: | ||
MessageOutputClass(); | ||
void init(Scheduler& scheduler); | ||
size_t write(uint8_t c) override; | ||
size_t write(const uint8_t* buffer, size_t size) override; | ||
void register_ws_output(AsyncWebSocket* output); | ||
|
||
private: | ||
void loop(); | ||
|
||
Task _loopTask; | ||
|
||
AsyncWebSocket* _ws = nullptr; | ||
char _buffer[BUFFER_SIZE]; | ||
uint16_t _buff_pos = 0; | ||
uint32_t _lastSend = 0; | ||
bool _forceSend = false; | ||
|
||
std::mutex _msgLock; | ||
}; | ||
|
||
extern MessageOutputClass MessageOutput; |
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
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
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
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.