mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
исправление бага графиков с датой
This commit is contained in:
@@ -27,10 +27,6 @@ void handleOrder() {
|
||||
|
||||
String id = selectToMarker(order, " ");
|
||||
|
||||
//это модификатор для даты графика
|
||||
// if (id.endsWith("-date")) {
|
||||
//}
|
||||
|
||||
//здесь нужно перебрать все методы execute всех векторов и выполнить те id которых совпали с id события
|
||||
IoTItem* item = findIoTItem(id);
|
||||
if (item) {
|
||||
|
||||
@@ -292,7 +292,7 @@ void hexdump(const void* mem, uint32_t len, uint8_t cols = 16) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void sendFileToWsByFrames(const String& filename, const String& header, const String& json, uint8_t client_id, size_t frameSize) {
|
||||
void sendFileToWsByFrames(const String& filename, const String& header, const String& json, int client_id, size_t frameSize) {
|
||||
if (header.length() != 6) {
|
||||
SerialPrint("E", "FS", F("wrong header size"));
|
||||
return;
|
||||
@@ -305,8 +305,8 @@ void sendFileToWsByFrames(const String& filename, const String& header, const St
|
||||
return;
|
||||
}
|
||||
|
||||
// size_t totalSize = file.size();
|
||||
// Serial.println("Send file '" + String(filename) + "', file size: " + String(totalSize));
|
||||
size_t totalSize = file.size();
|
||||
Serial.println("Send file '" + String(filename) + "', file size: " + String(totalSize));
|
||||
|
||||
char buf[32];
|
||||
sprintf(buf, "%04d", json.length() + 12);
|
||||
@@ -346,9 +346,11 @@ void sendFileToWsByFrames(const String& filename, const String& header, const St
|
||||
continuation = true;
|
||||
}
|
||||
|
||||
// Serial.println(String(i) + ") fr sz: " + String(size) + " fin: " + String(fin) + " cnt: " + String(continuation));
|
||||
Serial.println(String(i) + ") " + "ws: " + String(client_id) + " fr sz: " + String(size) + " fin: " + String(fin) + " cnt: " + String(continuation));
|
||||
|
||||
if (client_id == -1) {
|
||||
standWebSocket.broadcastBIN(frameBuf, size, fin, continuation);
|
||||
|
||||
} else {
|
||||
standWebSocket.sendBIN(client_id, frameBuf, size, fin, continuation);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ void* getAPI_Bme280(String subtype, String params);
|
||||
void* getAPI_Bmp280(String subtype, String params);
|
||||
void* getAPI_Dht1122(String subtype, String params);
|
||||
void* getAPI_Ds18b20(String subtype, String params);
|
||||
void* getAPI_FreqMeter(String subtype, String params);
|
||||
void* getAPI_GY21(String subtype, String params);
|
||||
void* getAPI_Hdc1080(String subtype, String params);
|
||||
void* getAPI_Max6675(String subtype, String params);
|
||||
@@ -27,7 +28,7 @@ void* getAPI_IoTServo(String subtype, String params);
|
||||
void* getAPI_Mcp23017(String subtype, String params);
|
||||
void* getAPI_Mp3(String subtype, String params);
|
||||
void* getAPI_Pcf8574(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_Pwm32(String subtype, String params);
|
||||
void* getAPI_TelegramLT(String subtype, String params);
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
|
||||
@@ -45,6 +46,7 @@ if ((tmpAPI = getAPI_Bme280(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Bmp280(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Dht1122(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Ds18b20(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_FreqMeter(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_GY21(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Hdc1080(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Max6675(subtype, params)) != nullptr) return tmpAPI;
|
||||
@@ -60,7 +62,7 @@ if ((tmpAPI = getAPI_IoTServo(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user