Cleanup only

This commit is contained in:
2025-12-29 11:09:33 +11:00
parent 9f0f2ce8fd
commit 2bd6094955
2 changed files with 16 additions and 12 deletions

View File

@@ -143,7 +143,7 @@ MyVictronCallback callback;
void setup() {
Serial.begin(115200);
delay(2000);
delay(1000);
Serial.println("\n\n=================================");
Serial.println("VictronBLE Multi-Device Example");
@@ -155,14 +155,12 @@ void setup() {
Serial.println(victron.getLastError());
while (1) delay(1000);
}
delay(1000);
// Enable debug output (optional)
victron.setDebug(true);
// Set callback for data updates
victron.setCallback(&callback);
delay(1000);
// Add your devices here
// Replace with your actual MAC addresses and encryption keys
@@ -189,7 +187,6 @@ void setup() {
"0ec3adf7433dd61793ff2f3b8ad32ed8", // Encryption key (32 hex chars)
DEVICE_TYPE_SOLAR_CHARGER // Device type
);
delay(1000);
/*
*
@@ -209,41 +206,47 @@ void setup() {
*/
// Example: Solar Charger #1
/*
victron.addDevice(
"MPPT 100/30", // Device name
"E7:48:D4:28:B7:9C", // MAC address
"0df4d0395b7d1a876c0c33ecb9e70dcd", // Encryption key (32 hex chars)
DEVICE_TYPE_SOLAR_CHARGER // Device type
);
*/
// Example: Solar Charger #2
/*
victron.addDevice(
"MPPT 75/15",
"AA:BB:CC:DD:EE:FF",
"1234567890abcdef1234567890abcdef",
DEVICE_TYPE_SOLAR_CHARGER
);
*/
// Example: Battery Monitor (SmartShunt)
/*
victron.addDevice(
"SmartShunt",
"11:22:33:44:55:66",
"fedcba0987654321fedcba0987654321",
DEVICE_TYPE_BATTERY_MONITOR
);
*/
// Example: Inverter/Charger
/*
victron.addDevice(
"MultiPlus",
"99:88:77:66:55:44",
"abcdefabcdefabcdefabcdefabcdefab",
DEVICE_TYPE_INVERTER
);
*/
delay(1000);
Serial.println("Configured " + String(victron.getDeviceCount()) + " devices");
Serial.println("\nStarting BLE scan...\n");
delay(1000);
}
void loop() {

View File

@@ -698,6 +698,7 @@ void VictronBLE::debugPrint(const String& message) {
}
}
// XXX Can't we use debugPrintf instead for hex struct etc?
void VictronBLE::debugPrintHex(const char* label, const uint8_t* data, size_t len) {
if (!debugEnabled) return;