White space cleanup

This commit is contained in:
Vegar Westerlund 2019-06-10 16:17:42 +02:00
parent 47c16af402
commit 07ef8db452
3 changed files with 48 additions and 48 deletions

View File

@ -125,7 +125,7 @@ void loop()
{
// Continously flash the LED when AP mode
if (millis() / 1000 % 2 == 0) led_on();
else led_off();
else led_off();
}
}
@ -133,9 +133,9 @@ void loop()
void led_on()
{
#if LED_ACTIVE_HIGH
digitalWrite(LED_PIN, HIGH);
digitalWrite(LED_PIN, HIGH);
#else
digitalWrite(LED_PIN, LOW);
digitalWrite(LED_PIN, LOW);
#endif
}
@ -143,9 +143,9 @@ void led_on()
void led_off()
{
#if LED_ACTIVE_HIGH
digitalWrite(LED_PIN, LOW);
digitalWrite(LED_PIN, LOW);
#else
digitalWrite(LED_PIN, HIGH);
digitalWrite(LED_PIN, HIGH);
#endif
}

View File

@ -62,20 +62,20 @@ bool HanReader::read(byte data)
void HanReader::debugPrint(byte *buffer, int start, int length)
{
for (int i = start; i < start + length; i++)
{
if (buffer[i] < 0x10)
debug->print("0");
debug->print(buffer[i], HEX);
debug->print(" ");
if ((i - start + 1) % 16 == 0)
debug->println("");
else if ((i - start + 1) % 4 == 0)
debug->print(" ");
for (int i = start; i < start + length; i++)
{
if (buffer[i] < 0x10)
debug->print("0");
debug->print(buffer[i], HEX);
debug->print(" ");
if ((i - start + 1) % 16 == 0)
debug->println("");
else if ((i - start + 1) % 4 == 0)
debug->print(" ");
yield(); // Let other get some resources too
}
debug->println("");
yield(); // Let other get some resources too
}
debug->println("");
}
bool HanReader::read()

View File

@ -8,8 +8,8 @@ enum class Kamstrup
{
List3PhaseShort = 0x19,
List3PhaseLong = 0x23,
List1PhaseShort = 0x11,
List1PhaseLong = 0x1B
List1PhaseShort = 0x11,
List1PhaseLong = 0x1B
};
enum class Kamstrup_List3Phase
@ -54,34 +54,34 @@ enum class Kamstrup_List3Phase
enum class Kamstrup_List1Phase
{
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
VoltageL1_OBIS,
VoltageL1,
MeterClock_OBIS,
MeterClock,
CumulativeActiveImportEnergy_OBIS,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy_OBIS,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy_OBIS,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy_OBIS,
CumulativeReactiveExportEnergy
ListSize,
ListVersionIdentifier,
MeterID_OBIS,
MeterID,
MeterType_OBIS,
MeterType,
ActiveImportPower_OBIS,
ActiveImportPower,
ActiveExportPower_OBIS,
ActiveExportPower,
ReactiveImportPower_OBIS,
ReactiveImportPower,
ReactiveExportPower_OBIS,
ReactiveExportPower,
CurrentL1_OBIS,
CurrentL1,
VoltageL1_OBIS,
VoltageL1,
MeterClock_OBIS,
MeterClock,
CumulativeActiveImportEnergy_OBIS,
CumulativeActiveImportEnergy,
CumulativeActiveExportEnergy_OBIS,
CumulativeActiveExportEnergy,
CumulativeReactiveImportEnergy_OBIS,
CumulativeReactiveImportEnergy,
CumulativeReactiveExportEnergy_OBIS,
CumulativeReactiveExportEnergy
};
#endif