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
    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))

    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.

  • M5Stack

    @heybin 我们可以加一个这样的block吗

  • sure, like joystick0.InverX and joystick0.InvertY

  • @heybin Yes, some simple blocks with a function like that.