Skip to content

Commit

Permalink
Merge pull request #1839 from proddy/dev
Browse files Browse the repository at this point in the history
minor updates for modbus
  • Loading branch information
proddy authored Jul 3, 2024
2 parents 9277efd + 12a4942 commit a0ca1ce
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- make remote control timeout editable [#1774](https://github.com/emsesp/EMS-ESP32/issues/1774)
- added extra pump characteristics (mode and pressure for EMS+) by @SLTKA [#1802](https://github.com/emsesp/EMS-ESP32/pull/1802)
- allow device name to be customized [#1174](https://github.com/emsesp/EMS-ESP32/issues/1174)
- Modbus support by @mheyse [#1744](https://github.com/emsesp/EMS-ESP32/issues/1744)

## Fixed

Expand Down
2 changes: 1 addition & 1 deletion interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-dom": "latest",
"react-dropzone": "^14.2.3",
"react-icons": "^5.2.1",
"react-router-dom": "^6.24.0",
"react-router-dom": "^6.24.1",
"react-toastify": "^10.0.5",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.5.3"
Expand Down
32 changes: 16 additions & 16 deletions interface/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1404,10 +1404,10 @@ __metadata:
languageName: node
linkType: hard

"@remix-run/router@npm:1.17.0":
version: 1.17.0
resolution: "@remix-run/router@npm:1.17.0"
checksum: 10c0/6f39cb81c5dec3d3cb901cfc05ef1c745d23192def7d83e6d1a53c43cbb5d7ff488055fd1418ac72f904ff41b3d3ca339d223677994150f276c648123ce166f7
"@remix-run/router@npm:1.17.1":
version: 1.17.1
resolution: "@remix-run/router@npm:1.17.1"
checksum: 10c0/bee1631feb03975b64e1c7b574da432a05095dda2ff0f164c737e4952841a58d7b9861de87bd13a977fd970c74dcf8c558fc2d26c6ec01a9ae9041b1b4430869
languageName: node
linkType: hard

Expand Down Expand Up @@ -2016,7 +2016,7 @@ __metadata:
react-dom: "npm:latest"
react-dropzone: "npm:^14.2.3"
react-icons: "npm:^5.2.1"
react-router-dom: "npm:^6.24.0"
react-router-dom: "npm:^6.24.1"
react-toastify: "npm:^10.0.5"
rollup-plugin-visualizer: "npm:^5.12.0"
terser: "npm:^5.31.1"
Expand Down Expand Up @@ -6130,27 +6130,27 @@ __metadata:
languageName: node
linkType: hard

"react-router-dom@npm:^6.24.0":
version: 6.24.0
resolution: "react-router-dom@npm:6.24.0"
"react-router-dom@npm:^6.24.1":
version: 6.24.1
resolution: "react-router-dom@npm:6.24.1"
dependencies:
"@remix-run/router": "npm:1.17.0"
react-router: "npm:6.24.0"
"@remix-run/router": "npm:1.17.1"
react-router: "npm:6.24.1"
peerDependencies:
react: ">=16.8"
react-dom: ">=16.8"
checksum: 10c0/2cb41120c1ff58fd1e187807214cf581e78e2845e5f411aa6a04f4748bd100431fd1ac5f8a45db281ea03d0d2354b66896b938c0b77adf7b343a6c1be52411de
checksum: 10c0/458c6c539304984c47b0ad8d5d5b1f8859cc0845e47591d530cb4fcb13498f70a89b42bc4daeea55d57cfa08408b453bcf601cabb2c987f554cdcac13805caa8
languageName: node
linkType: hard

"react-router@npm:6.24.0":
version: 6.24.0
resolution: "react-router@npm:6.24.0"
"react-router@npm:6.24.1":
version: 6.24.1
resolution: "react-router@npm:6.24.1"
dependencies:
"@remix-run/router": "npm:1.17.0"
"@remix-run/router": "npm:1.17.1"
peerDependencies:
react: ">=16.8"
checksum: 10c0/ad9c924d16dc4f5c90dff588e9a69d37488d2ad537de1ddbdf3b68561658c6e3fd1b8b12d16d50f19177f6547748c54e948d477e921f9230799ac71acfec24cf
checksum: 10c0/f50c78ca52c5154ab933c17708125e8bf71ccf2072993a80302526a0a23db9ceac6e36d5c891d62ccd16f13e60cd1b6533a2036523d1b09e0148ac49e34b2e83
languageName: node
linkType: hard

Expand Down
2 changes: 1 addition & 1 deletion src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ uint16_t Helpers::string2minutes(const std::string & str) {
}
}

float Helpers::numericoperator2scalefactor(uint8_t numeric_operator) {
float Helpers::numericoperator2scalefactor(int8_t numeric_operator) {
if (numeric_operator == 0)
return 1.0f;
else if (numeric_operator > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Helpers {
static bool check_abs(const int32_t i);
static uint32_t abs(const int32_t i);
static uint16_t string2minutes(const std::string & str);
static float numericoperator2scalefactor(uint8_t numeric_operator);
static float numericoperator2scalefactor(int8_t numeric_operator);

static float transformNumFloat(float value, const int8_t numeric_operator, const uint8_t fahrenheit = 0);

Expand Down
4 changes: 3 additions & 1 deletion src/modbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ void Modbus::start(uint8_t systemServerId, uint16_t port, uint8_t max_clients, u
void Modbus::stop() {
#ifndef EMSESP_STANDALONE
modbusServer_->stop();
delete modbusServer_;
// virtual ~ModbusServerTCPasync() = default;
// delete modbusServer_;
modbusServer_ = nullptr;
#endif
}
Expand All @@ -65,6 +66,7 @@ bool Modbus::check_parameter_order() {
if (isFirst) {
isFirst = false;
} else if (prev == nullptr || !prev->isLessThan(mi)) {
// TODO fix nullptr dereference when printing
LOG_ERROR("Error in modbus parameters: %s must be listed before %s.", mi.short_name, prev->short_name);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.7.0-dev.20"
#define EMSESP_APP_VERSION "3.7.0-dev.21"

0 comments on commit a0ca1ce

Please sign in to comment.