Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printChar does not block #463

Open
pelikhan opened this issue Apr 17, 2020 · 6 comments
Open

printChar does not block #463

pelikhan opened this issue Apr 17, 2020 · 6 comments
Assignees

Comments

@pelikhan
Copy link

This code in MakeCode leads to a blank screen because X is erased immediately by clearScreen

input.onButtonPressed(Button.A, function () {
    basic.showString("X")
    basic.clearScreen()
})

The showString function in PXT calls into printChar.

https://github.com/microsoft/pxt-microbit/blame/50ec105c4faeaca8bf1ac8636b5b5021afd937ba/libs/core/basic.cpp#L37

Could this be related to the new fibers?

@pelikhan
Copy link
Author

pxt bug: microsoft/pxt-microbit#2821

@pelikhan pelikhan reopened this Apr 17, 2020
@pelikhan pelikhan transferred this issue from lancaster-university/codal-core Apr 17, 2020
@pelikhan
Copy link
Author

@finneyj @jamesadevine

@finneyj
Copy link
Contributor

finneyj commented Apr 21, 2020

@pelikhan

Thanks - Fixed in v2.2.0-rc4

I went through the while print() family of methods and tested/unified behaviour, so hopefully we won't see any more regressions in MicroBitDisplay.

@pelikhan
Copy link
Author

The print method now clears the screen after executing. This is a breaking change from the previous behavior. Can we revert to leaving the screen as is?

https://github.com/lancaster-university/microbit-dal/releases/tag/v2.2.0-rc4

@finneyj
Copy link
Contributor

finneyj commented Apr 24, 2020

unintentional - apologies @pelikhan

fixed in 673228f

v2.2.0-rc5

@pelikhan
Copy link
Author

All bugs are features by now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants