Merge remote-tracking branch 'origin/master' into ICM20948_fix
# Conflicts: # esp32/src/main.cpp # esp32/src/peripherals/peripherals.cpp
This commit is contained in:
@@ -38,16 +38,16 @@ class CommAdapterBase {
|
||||
array.add(event);
|
||||
array.add(payload);
|
||||
|
||||
// TODO: Only send to subscribed
|
||||
|
||||
#if USE_MSGPACK
|
||||
std::string bin;
|
||||
serializeMsgPack(doc, bin);
|
||||
send(reinterpret_cast<const uint8_t *>(bin.data()), bin.size(), -1); // TODO: Make CID dynamic
|
||||
xSemaphoreGive(mutex_);
|
||||
send(reinterpret_cast<const uint8_t *>(bin.data()), bin.size(), -1);
|
||||
#else
|
||||
String out;
|
||||
serializeJson(doc, out);
|
||||
send(out.c_str(), cid);
|
||||
xSemaphoreGive(mutex_);
|
||||
send(out.c_str(), -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <communication/comm_base.hpp>
|
||||
|
||||
class Websocket : CommAdapterBase {
|
||||
class Websocket : public CommAdapterBase {
|
||||
public:
|
||||
Websocket(PsychicHttpServer &server, const char *route = "/api/ws");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <ESPmDNS.h>
|
||||
#include <PsychicHttp.h>
|
||||
#include <WiFi.h>
|
||||
// #include <communication/websocket_adapter.h>
|
||||
#include <communication/websocket_adapter.h>
|
||||
#include <filesystem.h>
|
||||
#include <global.h>
|
||||
#include "esp_timer.h"
|
||||
@@ -25,7 +25,7 @@ void sleep();
|
||||
void status(JsonObject &root);
|
||||
void metrics(JsonObject &root);
|
||||
|
||||
void emitMetrics();
|
||||
void emitMetrics(Websocket &socket);
|
||||
|
||||
const char *resetReason(esp_reset_reason_t reason);
|
||||
} // namespace system_service
|
||||
Reference in New Issue
Block a user