mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
Battery and inverter can bus can be selected in the UI
This commit is contained in:
parent
c63ae6eb23
commit
e3de4e546c
29 changed files with 224 additions and 65 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "sdcard.h"
|
||||
#include "../../include.h"
|
||||
#include "freertos/ringbuf.h"
|
||||
|
||||
File can_log_file;
|
||||
|
@ -183,13 +184,11 @@ void init_logging_buffers() {
|
|||
}
|
||||
|
||||
bool init_sdcard() {
|
||||
|
||||
auto miso_pin = esp32hal->SD_MISO_PIN();
|
||||
auto mosi_pin = esp32hal->SD_MOSI_PIN();
|
||||
auto miso_pin = esp32hal->SD_MISO_PIN();
|
||||
auto sclk_pin = esp32hal->SD_SCLK_PIN();
|
||||
|
||||
if (!esp32hal->alloc_pins("SD Card", miso_pin, mosi_pin)) {
|
||||
if (!esp32hal->alloc_pins("SD Card", miso_pin, mosi_pin, sclk_pin)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -201,7 +200,7 @@ bool init_sdcard() {
|
|||
#ifdef DEBUG_LOG
|
||||
logging.println("SD Card initialization failed!");
|
||||
#endif // DEBUG_LOG
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
clear_event(EVENT_SD_INIT_FAILED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue