diff --git a/lib/Hoymiles/src/parser/DevInfoParser.cpp b/lib/Hoymiles/src/parser/DevInfoParser.cpp index 24ea88331..343cdd0e2 100644 --- a/lib/Hoymiles/src/parser/DevInfoParser.cpp +++ b/lib/Hoymiles/src/parser/DevInfoParser.cpp @@ -170,8 +170,8 @@ uint8_t DevInfoParser::getDevIdx() /* struct tm to seconds since Unix epoch */ time_t DevInfoParser::timegm(struct tm* t) { - register uint32_t year; - register time_t result; + uint32_t year; + time_t result; #define MONTHSPERYEAR 12 /* months per calendar year */ static const int cumdays[MONTHSPERYEAR] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; diff --git a/platformio.ini b/platformio.ini index 97272cda1..9b387d3ac 100644 --- a/platformio.ini +++ b/platformio.ini @@ -20,13 +20,17 @@ platform = espressif32@>=6.0.1 build_flags = -DCOMPONENT_EMBED_FILES=webapp_dist/index.html.gz:webapp_dist/zones.json.gz:webapp_dist/favicon.ico:webapp_dist/js/app.js.gz -Wall -Wextra -Werror + -std=c++17 + -std=gnu++17 +build_unflags = + -std=gnu++11 lib_deps = https://github.com/yubox-node-org/ESPAsyncWebServer bblanchon/ArduinoJson @ ^6.21.0 https://github.com/bertmelis/espMqttClient.git#v1.4.1 nrf24/RF24 @ ^1.4.5 - olikraus/U8g2 @ ^2.34.13 + olikraus/U8g2 @ ^2.34.16 buelowp/sunset @ ^1.1.7 extra_scripts = diff --git a/platformio_override.ini b/platformio_override.ini index 481552400..aab12e37d 100644 --- a/platformio_override.ini +++ b/platformio_override.ini @@ -18,7 +18,6 @@ ;upload_port = COM4 - ; you can define your personal board and/or settings here ; non functional example: diff --git a/src/MqttHandleInverter.cpp b/src/MqttHandleInverter.cpp index 67196fec3..daba917b0 100644 --- a/src/MqttHandleInverter.cpp +++ b/src/MqttHandleInverter.cpp @@ -126,9 +126,12 @@ void MqttHandleInverterClass::publishField(std::shared_ptr inv return; } - MqttSettings.publish(topic, String( + String value = String( inv->Statistics()->getChannelFieldValue(type, channel, fieldId), - static_cast(inv->Statistics()->getChannelFieldDigits(type, channel, fieldId)))); + static_cast(inv->Statistics()->getChannelFieldDigits(type, channel, fieldId))); + value.trim(); + + MqttSettings.publish(topic, value); } String MqttHandleInverterClass::getTopic(std::shared_ptr inv, ChannelType_t type, ChannelNum_t channel, FieldId_t fieldId) diff --git a/webapp/package.json b/webapp/package.json index 27bad5ac1..c05a2052e 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -21,7 +21,7 @@ "vue-router": "^4.1.6" }, "devDependencies": { - "@intlify/unplugin-vue-i18n": "^0.9.2", + "@intlify/unplugin-vue-i18n": "^0.9.3", "@rushstack/eslint-patch": "^1.2.0", "@types/bootstrap": "^5.2.6", "@types/node": "^18.15.3", @@ -34,8 +34,8 @@ "npm-run-all": "^4.1.5", "sass": "^1.59.3", "terser": "^5.16.6", - "typescript": "^4.9.5", - "vite": "^4.2.0", + "typescript": "^5.0.2", + "vite": "^4.2.1", "vite-plugin-compression": "^0.5.1", "vite-plugin-css-injected-by-js": "^3.1.0", "vue-tsc": "^1.2.0" diff --git a/webapp/src/components/PinInfo.vue b/webapp/src/components/PinInfo.vue index 0770e3d55..e26bc6a42 100644 --- a/webapp/src/components/PinInfo.vue +++ b/webapp/src/components/PinInfo.vue @@ -11,8 +11,8 @@ -