Save configuration to preferences in NVS

This commit is contained in:
2026-02-02 18:43:39 +01:00
parent 59cbc64b08
commit 26dced7cee
9 changed files with 274 additions and 148 deletions

View File

@@ -43,7 +43,7 @@ bool Nmea2kTwai::CANSendFrame(unsigned long id, unsigned char len, const unsigne
return false;
}
txTimeouts = 0;
LOGD(TAG, "twai transmit id %ld, len %d", LOGID(id), (int)len);
LOGV(TAG, "twai transmit id %ld, len %d", LOGID(id), (int)len);
return true;
}
@@ -82,7 +82,7 @@ bool Nmea2kTwai::CANGetFrame(unsigned long &id, unsigned char &len, unsigned cha
LOGD(TAG, "twai: received invalid message %lld, len %d", LOGID(id), len);
len = 8;
}
LOGD(TAG, "twai rcv id=%ld,len=%d, ext=%d",
LOGV(TAG, "twai rcv id=%ld,len=%d, ext=%d",
LOGID(message.identifier), message.data_length_code, message.extd);
if (! message.rtr) {
memcpy(buf, message.data, message.data_length_code);
@@ -193,7 +193,7 @@ void Nmea2kTwai::loop()
Nmea2kTwai::Status Nmea2kTwai::logStatus()
{
Status canState = getStatus();
LOGI(TAG, "twai state %s, rxerr %d, txerr %d, txfail %d, txtimeout %d, rxmiss %d, rxoverrun %d",
LOGD(TAG, "twai state %s, rxerr %d, txerr %d, txfail %d, txtimeout %d, rxmiss %d, rxoverrun %d",
stateStr(canState.state),
canState.rx_errors,
canState.tx_errors,