Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Jul 24, 2022
1 parent d12879b commit d0a779b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/emsdevice.cpp
Expand Up @@ -114,7 +114,7 @@ std::string EMSdevice::device_type_2_device_name(const uint8_t device_type) {
// returns device_type from a string
uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
if (!topic) {
return DeviceType::UNKNOWN; // nullptr
return DeviceType::UNKNOWN;
}

// convert topic to lowercase and compare
Expand Down
4 changes: 2 additions & 2 deletions src/locale_DE.h
Expand Up @@ -269,7 +269,7 @@ MAKE_PSTR(bufferedflow, "Durchlaufspeicher")
MAKE_PSTR(layeredbuffer, "Schichtspeicher")
MAKE_PSTR(maintenance, "Wartung")
MAKE_PSTR(heating, "Heizen")
MAKE_PSTR(cooling, "Kühlen")
MAKE_PSTR(cooling, "K�hlen")

// boiler lists
MAKE_PSTR_LIST(tpl_date, F("Format: < dd.mm.yyyy >")) // template for text input
Expand Down Expand Up @@ -312,7 +312,7 @@ MAKE_PSTR(winter, "Winter")
MAKE_PSTR(outdoor, "Aussentemperatur")
MAKE_PSTR_WORD(mpc)
MAKE_PSTR(room, "Raum")
MAKE_PSTR(room_outdoor, "Raum+Außen")
MAKE_PSTR(room_outdoor, "Raum+Au�en")
MAKE_PSTR(power, "Leistung")
MAKE_PSTR(constant, "konstant")
MAKE_PSTR(simple, "einfach")
Expand Down
2 changes: 0 additions & 2 deletions src/web/WebAPIService.cpp
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// SUrlParser from https://github.com/Mad-ness/simple-url-parser

#include "emsesp.h"

using namespace std::placeholders; // for `_1` etc
Expand Down
2 changes: 1 addition & 1 deletion src/web/WebDataService.cpp
Expand Up @@ -74,10 +74,10 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
JsonObject root = response->getRoot();

// list is already sorted by device type
// Ignore Contoller
JsonArray devices = root.createNestedArray("devices");
char buffer[3];
for (const auto & emsdevice : EMSESP::emsdevices) {
// ignore controller
if (emsdevice && (emsdevice->device_type() != EMSdevice::DeviceType::CONTROLLER || emsdevice->count_entities() > 0)) {
JsonObject obj = devices.createNestedObject();
obj["id"] = Helpers::smallitoa(buffer, emsdevice->unique_id()); // a unique id as a string
Expand Down

0 comments on commit d0a779b

Please sign in to comment.