mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-01 08:37:16 +02:00
add method entry debug statements
This commit is contained in:
parent
ae1272ccf0
commit
b1906f0f31
8 changed files with 90 additions and 0 deletions
|
@ -41,12 +41,14 @@ class Main {
|
|||
virtual void updateCrc(void);
|
||||
|
||||
inline uint16_t buildEEpCrc(uint32_t start, uint32_t length) {
|
||||
DPRINTLN(F("main.h:buildEEpCrc"));
|
||||
uint8_t buf[length];
|
||||
mEep->read(start, buf, length);
|
||||
return crc16(buf, length);
|
||||
}
|
||||
|
||||
bool checkEEpCrc(uint32_t start, uint32_t length, uint32_t crcPos) {
|
||||
DPRINTLN(F("main.h:checkEEpCrc"));
|
||||
uint16_t crcRd, crcCheck;
|
||||
crcCheck = buildEEpCrc(start, length);
|
||||
mEep->read(crcPos, &crcRd);
|
||||
|
@ -55,6 +57,7 @@ class Main {
|
|||
}
|
||||
|
||||
void eraseSettings(bool all = false) {
|
||||
DPRINTLN(F("main.h:eraseSettings"));
|
||||
uint8_t buf[64] = {0};
|
||||
uint16_t addr = (all) ? ADDR_START : ADDR_START_SETTINGS;
|
||||
uint16_t end;
|
||||
|
@ -69,6 +72,7 @@ class Main {
|
|||
}
|
||||
|
||||
inline bool checkTicker(uint32_t *ticker, uint32_t interval) {
|
||||
//DPRINT(F("c"));
|
||||
uint32_t mil = millis();
|
||||
if(mil >= *ticker) {
|
||||
*ticker = mil + interval;
|
||||
|
@ -83,6 +87,7 @@ class Main {
|
|||
}
|
||||
|
||||
void stats(void) {
|
||||
DPRINTLN(F("main.h:stats"));
|
||||
uint32_t free;
|
||||
uint16_t max;
|
||||
uint8_t frag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue