I was noticed by @DanutAldea that the example app for the temperature API is not working as expected on microbit:v2. I found out that the app would freeze when it tries to write an empty string (in case of positive temperature):
A possible fix would be adding a size check in the write function of the console API, preventing it from yielding in case of an empty string.
I have also tried to remove the size check from the driver, and it worked, but the other approach seems better.
I was noticed by @DanutAldea that the example app for the temperature API is not working as expected on microbit:v2. I found out that the app would freeze when it tries to write an empty string (in case of positive temperature):
The console write function calls yield, but it never receives a callback, because the transmit buffer function from the uart driver returns a SIZE error if buffer length is 0.
A possible fix would be adding a size check in the write function of the console API, preventing it from yielding in case of an empty string. I have also tried to remove the size check from the driver, and it worked, but the other approach seems better.
@alexandruradovici , what do you think?