Merge pull request #388 from bobbycar-graz/optimizations
This commit is contained in:
@ -308,7 +308,7 @@ void sendCanCommands()
|
||||
++can_total_error_cnt;
|
||||
can_sequential_bus_errors = status_info.bus_error_count;
|
||||
|
||||
if (can_total_error_cnt < 500)
|
||||
if (can_total_error_cnt < 500 && (configs.canUninstallOnReset.value() && can_total_error_cnt < 100))
|
||||
ESP_LOGW(TAG, "twai_transmit() failed after %lldms with %s, seq err: %lu, total err: %lu",
|
||||
std::chrono::floor<std::chrono::milliseconds>(timestamp_after - timestamp_before).count(),
|
||||
esp_err_to_name(result),
|
||||
|
@ -84,12 +84,12 @@ BobbySchedulerTask schedulerTasksArr[] {
|
||||
BobbySchedulerTask { "ledstrip", initLedStrip, updateLedStrip, 30ms, false },
|
||||
BobbySchedulerTask { "espnow", espnow::initESPNow, espnow::handle, 100ms, false },
|
||||
BobbySchedulerTask { "cloud", initCloud, updateCloud, 50ms, false },
|
||||
BobbySchedulerTask { "udpcloud", udpCloudInit, udpCloudUpdate, 25ms, false },
|
||||
BobbySchedulerTask { "udpcloud", udpCloudInit, udpCloudUpdate, 50ms, false },
|
||||
BobbySchedulerTask { "drivingmode", initDrivingMode, updateDrivingMode, 20ms, false },
|
||||
BobbySchedulerTask { "drivingstatistics", initStatistics, calculateStatistics, 100ms, false },
|
||||
BobbySchedulerTask { "dnsannounce", init_dns_announce, handle_dns_announce, 100ms, false },
|
||||
BobbySchedulerTask { "updateDisp", not_needed, updateDisplay, 20ms, true },
|
||||
BobbySchedulerTask { "redrawDisp", not_needed, redrawDisplay, 20ms, true },
|
||||
BobbySchedulerTask { "redrawDisp", not_needed, redrawDisplay, 40ms, true },
|
||||
BobbySchedulerTask { "feedbackEmulator", feedbackemulator::init, feedbackemulator::update, 500ms, false},
|
||||
};
|
||||
} // namespace
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "drivingstatistics.h"
|
||||
#include "globals.h"
|
||||
#include "newsettings.h"
|
||||
#include "taskmanager.h"
|
||||
#include "udpsender.h"
|
||||
#include "utils.h"
|
||||
|
||||
@ -163,6 +164,7 @@ std::optional<std::string> buildUdpCloudJson()
|
||||
}
|
||||
|
||||
doc["__t"] = configs.udpCloudSettings.udpToken.value();
|
||||
doc["per"] = drivingModeTask.callCount();
|
||||
|
||||
std::string buf;
|
||||
serializeJson(doc, buf);
|
||||
|
Reference in New Issue
Block a user