strawlab / Miriam

Miriam is an open-source isothermal reaction instrument featuring realtime fluorescence readout in a 96-well plate format
Other
8 stars 3 forks source link

potential problem with command reception #9

Open DeepSOIC opened 3 years ago

DeepSOIC commented 3 years ago

https://github.com/strawlab/Miriam/blob/ebd0f5842837691fb4a99aa3a80c23b6f0dde5e3/Programs/Serial_003/Serial_003.ino#L864

When the newline character arrives, a flag is set. However, reception of new characters is not stopped. In a case where several commands are sent in a row, this may cause some part of the next command end up interpreted as appended to this command (Serial has a built-in buffer, so if it is not drained regularly enough, several characters will appear to have arrived at the same time). This will break parsing of both commands.