joopert / nad_receiver

python api to connect to NAD receivers
MIT License
12 stars 18 forks source link

Make sure to read the actual message when just '\r' is received #35

Closed gladhorn closed 4 years ago

gladhorn commented 4 years ago

I'm surprised that the previous code worked, I should have broken something. It seems to be a bit model dependent though, but the devices seem relatively consistent in sending b'\rmessage\r', so always read until '\r', check if that is empty, in which case reading until the next '\r' should give the message.