@alteriom/painlessmesh 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/library.json +2 -1
- package/library.properties +1 -1
- package/package.json +1 -1
- package/src/painlessmesh/mesh.hpp +13 -0
- package/src/painlessmesh/router.hpp +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.3] - 2025-12-02
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **sendToInternet Example Compilation** - Fixed two compilation errors in the sendToInternet example:
|
|
13
|
+
- Added missing `addTask(callback, delay)` overload in mesh.hpp for one-shot delayed tasks
|
|
14
|
+
- Fixed `sendWithPriority` template functions in router.hpp to use `Variant(&package)` instead of `Variant(package)`, enabling proper construction from any PackageInterface-derived class including GatewayDataPackage
|
|
15
|
+
- **Impact**: The sendToInternet example now compiles correctly with Arduino IDE
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **sendToInternet Example** - Added to library.json examples list for better discoverability
|
|
20
|
+
|
|
8
21
|
## [1.9.2] - 2025-12-01
|
|
9
22
|
|
|
10
23
|
### Changed
|
package/library.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/Alteriom/painlessMesh"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.9.
|
|
9
|
+
"version": "1.9.3",
|
|
10
10
|
"frameworks": [
|
|
11
11
|
"arduino"
|
|
12
12
|
],
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"examples/otaReceiver/otaReceiver.ino",
|
|
89
89
|
"examples/otaSender/otaSender.ino",
|
|
90
90
|
"examples/priority/priority_basic_example.ino",
|
|
91
|
+
"examples/sendToInternet/sendToInternet.ino",
|
|
91
92
|
"examples/sharedGateway/sharedGateway.ino",
|
|
92
93
|
"examples/startHere/startHere.ino",
|
|
93
94
|
"examples/webServer/webServer.ino"
|
package/library.properties
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name=Alteriom PainlessMesh
|
|
2
|
-
version=1.9.
|
|
2
|
+
version=1.9.3
|
|
3
3
|
author=Coopdis,Scotty Franzyshen,Edwin van Leeuwen,Germán Martín,Maximilian Schwarz,Doanh Doanh,Alteriom
|
|
4
4
|
maintainer=Alteriom
|
|
5
5
|
sentence=A painless way to setup a mesh with ESP8266 and ESP32 devices with Alteriom extensions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alteriom/painlessmesh",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arduino",
|
|
@@ -3038,6 +3038,19 @@ class Mesh : public ntp::MeshTime, public plugin::PackageHandler<T> {
|
|
|
3038
3038
|
return plugin::PackageHandler<T>::addTask((*this->mScheduler), aCallback);
|
|
3039
3039
|
}
|
|
3040
3040
|
|
|
3041
|
+
/**
|
|
3042
|
+
* Add a one-shot delayed task
|
|
3043
|
+
*
|
|
3044
|
+
* @param aCallback Function to call after the delay
|
|
3045
|
+
* @param delayMs Delay in milliseconds before executing the callback
|
|
3046
|
+
* @return Shared pointer to the task
|
|
3047
|
+
*/
|
|
3048
|
+
inline std::shared_ptr<Task> addTask(std::function<void()> aCallback,
|
|
3049
|
+
unsigned long delayMs) {
|
|
3050
|
+
return plugin::PackageHandler<T>::addTask((*this->mScheduler), delayMs,
|
|
3051
|
+
TASK_ONCE, aCallback);
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3041
3054
|
~Mesh() {
|
|
3042
3055
|
this->stop();
|
|
3043
3056
|
if (!isExternalScheduler) delete mScheduler;
|
|
@@ -67,7 +67,7 @@ bool send(protocol::Variant&& variant, std::shared_ptr<U> conn,
|
|
|
67
67
|
// New priority-level send functions (0-3 priority levels)
|
|
68
68
|
template <class T, class U>
|
|
69
69
|
bool sendWithPriority(T& package, std::shared_ptr<U> conn, uint8_t priorityLevel) {
|
|
70
|
-
painlessmesh::protocol::Variant variant(package);
|
|
70
|
+
painlessmesh::protocol::Variant variant(&package);
|
|
71
71
|
TSTRING msg;
|
|
72
72
|
variant.printTo(msg);
|
|
73
73
|
return conn->addMessageWithPriority(msg, priorityLevel);
|
|
@@ -75,7 +75,7 @@ bool sendWithPriority(T& package, std::shared_ptr<U> conn, uint8_t priorityLevel
|
|
|
75
75
|
|
|
76
76
|
template <class T, class U>
|
|
77
77
|
bool sendWithPriority(T&& package, std::shared_ptr<U> conn, uint8_t priorityLevel) {
|
|
78
|
-
painlessmesh::protocol::Variant variant(package);
|
|
78
|
+
painlessmesh::protocol::Variant variant(&package);
|
|
79
79
|
TSTRING msg;
|
|
80
80
|
variant.printTo(msg);
|
|
81
81
|
return conn->addMessageWithPriority(msg, priorityLevel);
|