Removed display-related websocket stuff for merge
This commit is contained in:
@ -721,7 +721,7 @@ void cloudSend()
|
||||
if (configs.cloudUrl.value().empty())
|
||||
return;
|
||||
|
||||
if (!configs.cloudSettings.sendStatistic.value() && !configs.cloudSettings.sendScreen.value())
|
||||
if (!configs.cloudSettings.sendStatistic.value())
|
||||
return;
|
||||
|
||||
if (!cloudStarted)
|
||||
@ -776,43 +776,6 @@ std::string getLoginMessage()
|
||||
configs.otaUsername.value(), tft.width(), tft.height(), configs.webserverPassword.value(), configs.cloudSettings.cloudKey.value());
|
||||
}
|
||||
|
||||
|
||||
void cloudSendDisplay(std::string_view data)
|
||||
{
|
||||
static std::string screenBuffer;
|
||||
static uint64_t msg_id{0};
|
||||
|
||||
if (!cloudStarted || !cloudClient || !cloudClient.is_connected() || espchrono::ago(isSendingNvs) < 4s)
|
||||
return;
|
||||
|
||||
/* custom menu display handling
|
||||
if (!espgui::currentDisplay)
|
||||
return;
|
||||
|
||||
if (const auto &menuDisplay = espgui::currentDisplay->asMenuDisplay(); menuDisplay)
|
||||
{
|
||||
// custom handle menu display
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
// fill 1024 bytes with the data
|
||||
screenBuffer += std::string{data} + '\u0000';
|
||||
|
||||
if (screenBuffer.length() > 1024)
|
||||
{
|
||||
// send data
|
||||
const auto timeout = std::chrono::ceil<espcpputils::ticks>(
|
||||
espchrono::milliseconds32{configs.cloudSettings.cloudTransmitTimeout.value()}).count();
|
||||
cloudClient.send_text(screenBuffer, timeout);
|
||||
|
||||
// clear buffer
|
||||
screenBuffer.clear();
|
||||
ESP_LOGI(TAG, "sent screen data %lu", msg_id);
|
||||
msg_id++;
|
||||
}
|
||||
}
|
||||
|
||||
void cloudEventHandler(void *event_handler_arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
|
||||
{
|
||||
CPP_UNUSED(event_handler_arg);
|
||||
|
Reference in New Issue
Block a user