Invert X or Y blocks needed.
-
Just testing out UIFlow with the joystick and noticed that when using this code
from m5stack import * from m5ui import * import units clear_bg(0x222222) joystick0 = units.Joystick(units.PORTA) btnA = M5Button(name="ButtonA", text="ButtonA", visibility=False) btnB = M5Button(name="ButtonB", text="ButtonB", visibility=False) btnC = M5Button(name="ButtonC", text="ButtonC", visibility=False) circle1 = M5Circle(159, 100, 15, 0xFFFFFF, 0xFFFFFF) while True: circle1.setPosition((joystick0.X), (joystick0.Y)) wait(0.001)X axis or Y axis needs inverting to correct direction. (this code is just the micropython code generated by blocky.)
Can we get a Inver X and Invert Y blocks added to the Joystick blocks please.
-
@heybin 我们可以加一个这样的block吗
-
sure, like joystick0.InverX and joystick0.InvertY
-
@heybin Yes, some simple blocks with a function like that.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login