Fix to be non blocking without tasks

This commit is contained in:
2026-02-28 14:31:42 +11:00
parent 31765c7ac8
commit 4944757903
5 changed files with 45 additions and 10 deletions
+3
View File
@@ -204,6 +204,7 @@ public:
VictronDeviceType type = DEVICE_TYPE_UNKNOWN);
void setCallback(VictronCallback cb) { callback = cb; }
void setDebug(bool enable) { debugEnabled = enable; }
void setMinInterval(uint32_t ms) { minIntervalMs = ms; }
size_t getDeviceCount() const { return deviceCount; }
void loop();
@@ -213,6 +214,7 @@ private:
struct DeviceEntry {
VictronDevice device;
uint8_t key[16];
uint16_t lastNonce;
bool active;
};
@@ -223,6 +225,7 @@ private:
VictronCallback callback;
bool debugEnabled;
uint32_t scanDuration;
uint32_t minIntervalMs;
bool initialized;
static bool hexToBytes(const char* hex, uint8_t* out, size_t len);