Simple_Serial rx issue
Hey, I'm new to the forum so I'm not sure if this has already been brought up.
I was messing around with Simple_Serial methods today, and I noticed that the rx method sometimes puts a 1 in bit 0 of the byte it returns, even if a 0 was sent for that bit. For example, if you were receiving the alphabet in ascii, it would be stored as acceeggiikk... etc. I fixed this by adding "b~" before the first if statement in the method, if you don't do that b is left uninitialized and you might get your first bit or'd with a 1 the first time b := ina[noparse][[/noparse]sin] << 7 | b >> 1 happens.
I was messing around with Simple_Serial methods today, and I noticed that the rx method sometimes puts a 1 in bit 0 of the byte it returns, even if a 0 was sent for that bit. For example, if you were receiving the alphabet in ascii, it would be stored as acceeggiikk... etc. I fixed this by adding "b~" before the first if statement in the method, if you don't do that b is left uninitialized and you might get your first bit or'd with a 1 the first time b := ina[noparse][[/noparse]sin] << 7 | b >> 1 happens.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔