mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Improvements to CAN logging to SD to significantly improve performance for busy CAN networks (#752)
- Migrate from SPI SD library to SD_MMC - Minimise the number of individual file writes by batching writes where possible - Write a binary stream to the buffer to stop corruption
This commit is contained in:
parent
33cbbd3c33
commit
1e93ad8740
3 changed files with 81 additions and 66 deletions
|
@ -112,7 +112,7 @@ void init_webserver() {
|
|||
// Define the handler to export can log
|
||||
server.on("/export_can_log", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
pause_can_writing();
|
||||
request->send(SD, CAN_LOG_FILE, String(), true);
|
||||
request->send(SD_MMC, CAN_LOG_FILE, String(), true);
|
||||
resume_can_writing();
|
||||
});
|
||||
|
||||
|
@ -133,7 +133,7 @@ void init_webserver() {
|
|||
// Define the handler to export debug log
|
||||
server.on("/export_log", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||
pause_log_writing();
|
||||
request->send(SD, LOG_FILE, String(), true);
|
||||
request->send(SD_MMC, LOG_FILE, String(), true);
|
||||
resume_log_writing();
|
||||
});
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue