PS_16_DZ: fix broken if-statement

This commit is contained in:
Joel Stein 2018-12-23 21:06:10 +01:00
parent 77c07a2e00
commit a013f4de82

View File

@ -159,9 +159,10 @@ void PS16DZSerialInput(void)
memset(ps16dz_rx_buffer, 0, PS16DZ_BUFFER_SIZE);
ps16dz_byte_counter = 0;
}
if (ps16dz_byte_counter || (!ps16dz_byte_counter && serial_in_byte == 'A'));
if (ps16dz_byte_counter || (!ps16dz_byte_counter && serial_in_byte == 'A')) {
ps16dz_rx_buffer[ps16dz_byte_counter++] = serial_in_byte;
}
}
else {
ps16dz_rx_buffer[ps16dz_byte_counter++] = 0x00;
snprintf_P(log_data, sizeof(log_data), PSTR("PSZ: command received: %s"), ps16dz_rx_buffer);