Merge pull request #252 from bobbycar-graz/update_submodules
Update submodules
This commit is contained in:
Submodule components/TFT_eSPI updated: d04ecacb6b...9af512fd27
Submodule components/arduino-esp32 updated: 40409a3e4f...59d3f4bd4f
Submodule components/esp-gui-lib updated: 91181efef8...eb17c286fe
Submodule components/espasyncota updated: ebfbee903b...67d7c6d721
Submodule components/espchrono updated: c273edf278...9c57959705
Submodule components/espconfiglib updated: 0b138ba5b7...fdb4ef6dbf
Submodule components/espcpputils updated: 4d36c0a994...247f89af97
Submodule components/esphttpdutils updated: bcf49369fd...7f62bb5344
Submodule components/espwifistack updated: 25bb86f9eb...bced0e2852
2
esp-idf
2
esp-idf
Submodule esp-idf updated: 740573214d...a9ef558d9d
@ -11,6 +11,7 @@
|
|||||||
#include <esphttpdutils.h>
|
#include <esphttpdutils.h>
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
#include <tickchrono.h>
|
#include <tickchrono.h>
|
||||||
|
#include <wrappers/websocket_client.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
@ -95,8 +96,8 @@ void cloudCollect()
|
|||||||
cloudBuffer += ',';
|
cloudBuffer += ',';
|
||||||
|
|
||||||
cloudBuffer += fmt::format("[{},{},{}",
|
cloudBuffer += fmt::format("[{},{},{}",
|
||||||
std::chrono::milliseconds{espchrono::millis_clock::now().time_since_epoch()}.count(),
|
std::chrono::floor<std::chrono::milliseconds>(espchrono::millis_clock::now().time_since_epoch()).count(),
|
||||||
std::chrono::milliseconds{espchrono::utc_clock::now().time_since_epoch()}.count(),
|
std::chrono::floor<std::chrono::milliseconds>(espchrono::utc_clock::now().time_since_epoch()).count(),
|
||||||
heap_caps_get_free_size(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT));
|
heap_caps_get_free_size(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT));
|
||||||
if (wifi_stack::get_sta_status() == wifi_stack::WiFiStaStatus::CONNECTED)
|
if (wifi_stack::get_sta_status() == wifi_stack::WiFiStaStatus::CONNECTED)
|
||||||
{
|
{
|
||||||
|
@ -134,7 +134,7 @@ std::string WifiApClientMenuItem::text() const
|
|||||||
return fmt::format("{}{}&c {}",
|
return fmt::format("{}{}&c {}",
|
||||||
rssiToColor(m_info.rssi),
|
rssiToColor(m_info.rssi),
|
||||||
m_info.rssi,
|
m_info.rssi,
|
||||||
(std::chrono::milliseconds{espchrono::millis_clock::now().time_since_epoch()} % 4000ms) < 2000ms ?
|
(espchrono::millis_clock::now().time_since_epoch() % 4000ms) < 2000ms ?
|
||||||
wifi_stack::toString(wifi_stack::mac_t{m_info.mac}) :
|
wifi_stack::toString(wifi_stack::mac_t{m_info.mac}) :
|
||||||
wifi_stack::toString(m_ip)
|
wifi_stack::toString(m_ip)
|
||||||
);
|
);
|
||||||
|
@ -4,10 +4,13 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
// 3rdparty lib includes
|
||||||
|
#include <espchrono.h>
|
||||||
|
|
||||||
struct DrivingStatistics
|
struct DrivingStatistics
|
||||||
{
|
{
|
||||||
float meters_driven;
|
float meters_driven;
|
||||||
std::chrono::milliseconds currentDrivingTime;
|
espchrono::millis_clock::duration currentDrivingTime;
|
||||||
double totalMeters;
|
double totalMeters;
|
||||||
uint32_t last_cm_written;
|
uint32_t last_cm_written;
|
||||||
float wh_used;
|
float wh_used;
|
||||||
|
@ -302,7 +302,7 @@ esp_err_t send_espnow_message(std::string_view message)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const auto timeAfter = espchrono::millis_clock::now();
|
const auto timeAfter = espchrono::millis_clock::now();
|
||||||
ESP_LOGI(TAG, "Successfully executed esp_now_send(): Took %lldms", std::chrono::milliseconds{timeAfter-timeBefore}.count());
|
ESP_LOGI(TAG, "Successfully executed esp_now_send(): Took %lldms", std::chrono::floor<std::chrono::milliseconds>(timeAfter-timeBefore).count());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
@ -177,13 +177,13 @@ void DefaultMode::update()
|
|||||||
{
|
{
|
||||||
if (m_lastPwm < pwm && profileSettings.defaultMode.enableSmoothingUp)
|
if (m_lastPwm < pwm && profileSettings.defaultMode.enableSmoothingUp)
|
||||||
{
|
{
|
||||||
pwm = std::min(pwm, m_lastPwm + (profileSettings.defaultMode.smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::min(pwm, m_lastPwm + (profileSettings.defaultMode.smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
if (pwm < 1000.)
|
if (pwm < 1000.)
|
||||||
pwm = 1000.;
|
pwm = 1000.;
|
||||||
}
|
}
|
||||||
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableSmoothingDown)
|
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableSmoothingDown)
|
||||||
{
|
{
|
||||||
pwm = std::max(pwm, m_lastPwm - (profileSettings.defaultMode.smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::max(pwm, m_lastPwm - (profileSettings.defaultMode.smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@ void DefaultMode::update()
|
|||||||
auto difference_to_target = std::abs(pwm-m_lastPwm);
|
auto difference_to_target = std::abs(pwm-m_lastPwm);
|
||||||
effective_smoothing *= std::max((difference_to_target / 500),0.5f);
|
effective_smoothing *= std::max((difference_to_target / 500),0.5f);
|
||||||
|
|
||||||
pwm = std::min(pwm, m_lastPwm + (effective_smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::min(pwm, m_lastPwm + (effective_smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
}
|
}
|
||||||
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableFieldWeakSmoothingDown)
|
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableFieldWeakSmoothingDown)
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ void DefaultMode::update()
|
|||||||
auto difference_to_target = std::abs(pwm-m_lastPwm);
|
auto difference_to_target = std::abs(pwm-m_lastPwm);
|
||||||
effective_smoothing *= std::max((difference_to_target / 500),0.5f);
|
effective_smoothing *= std::max((difference_to_target / 500),0.5f);
|
||||||
|
|
||||||
pwm = std::max(pwm, m_lastPwm - (effective_smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::max(pwm, m_lastPwm - (effective_smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,11 +189,11 @@ void WheelchairMode::update()
|
|||||||
{
|
{
|
||||||
if (m_lastPwm < pwm && profileSettings.defaultMode.enableSmoothingUp)
|
if (m_lastPwm < pwm && profileSettings.defaultMode.enableSmoothingUp)
|
||||||
{
|
{
|
||||||
pwm = std::min(pwm, m_lastPwm + (profileSettings.defaultMode.smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::min(pwm, m_lastPwm + (profileSettings.defaultMode.smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
}
|
}
|
||||||
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableSmoothingDown)
|
else if (m_lastPwm > pwm && profileSettings.defaultMode.enableSmoothingDown)
|
||||||
{
|
{
|
||||||
pwm = std::max(pwm, m_lastPwm - (profileSettings.defaultMode.smoothing * std::chrono::milliseconds{now - m_lastTime}.count() / 100.f));
|
pwm = std::max(pwm, m_lastPwm - (profileSettings.defaultMode.smoothing * std::chrono::floor<std::chrono::milliseconds>(now - m_lastTime).count() / 100.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user