auto-formatting

This commit is contained in:
proddy
2021-07-19 16:55:41 +02:00
parent 37d001e7b5
commit dd3a0a706d
10 changed files with 116 additions and 121 deletions

View File

@@ -28,7 +28,7 @@ WebDevicesService::WebDevicesService(AsyncWebServer * server, SecurityManager *
, _writevalue_dataHandler(WRITE_VALUE_SERVICE_PATH,
securityManager->wrapCallback(std::bind(&WebDevicesService::write_value, this, _1, _2), AuthenticationPredicates::IS_ADMIN))
, _writesensor_dataHandler(WRITE_SENSOR_SERVICE_PATH,
securityManager->wrapCallback(std::bind(&WebDevicesService::write_sensor, this, _1, _2), AuthenticationPredicates::IS_ADMIN)) {
securityManager->wrapCallback(std::bind(&WebDevicesService::write_sensor, this, _1, _2), AuthenticationPredicates::IS_ADMIN)) {
server->on(EMSESP_DEVICES_SERVICE_PATH,
HTTP_GET,
securityManager->wrapRequest(std::bind(&WebDevicesService::all_devices, this, _1), AuthenticationPredicates::IS_AUTHENTICATED));
@@ -178,7 +178,7 @@ void WebDevicesService::write_sensor(AsyncWebServerRequest * request, JsonVarian
}
}
ok = EMSESP::dallassensor_.add_name(nostr, name, offset);
}
}
}
AsyncWebServerResponse * response = request->beginResponse(ok ? 200 : 204);

View File

@@ -75,7 +75,7 @@ class WebLogService : public uuid::log::Handler {
unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages
unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch
std::list<QueuedLogMessage> log_messages_; // Queued log messages, in the order they were received
time_t time_offset_ = 0;
time_t time_offset_ = 0;
};
} // namespace emsesp

View File

@@ -33,7 +33,7 @@
namespace emsesp {
enum { BOOL_FORMAT_ONOFF = 1, BOOL_FORMAT_ONOFF_CAP, BOOL_FORMAT_TRUEFALSE, BOOL_FORMAT_10 }; // matches Web UI settings
enum { ENUM_FORMAT_TEXT = 1, ENUM_FORMAT_NUMBER }; // matches Web UI settings
enum { ENUM_FORMAT_TEXT = 1, ENUM_FORMAT_NUMBER }; // matches Web UI settings
class WebSettings {
public:
@@ -66,9 +66,9 @@ class WebSettings {
uint8_t enum_format;
struct {
String id;
String name;
int16_t offset;
String id;
String name;
int16_t offset;
} sensor[NUM_SENSOR_NAMES];
static void read(WebSettings & settings, JsonObject & root);