From 87a87f5843e71aa9057a091c1790eb2507eac61c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 17 Feb 2016 17:26:44 +0100 Subject: system: Reset storage after receipt of START signal --- src/system.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/system.cc b/src/system.cc index 864f98a..eb2caf6 100644 --- a/src/system.cc +++ b/src/system.cc @@ -60,8 +60,10 @@ void System::receive(void) rxExpect = START2; break; case START2: - if (rx_byte == 0x99) + if (rx_byte == 0x99) { rxExpect = PATTERN1; + storage.reset(); + } break; case PATTERN1: if (rx_byte == 0xa9) -- cgit v1.2.3