Esempio n. 1
0
slider.height = 30

button = PushButton(app)
button.width = 20
button.height = 2

pic = Picture(app, image="guizero.gif")
pic.width = 400
pic.height = 50

combo = Combo(app, ["martin", "laura", "rik"])
combo.width = 50
combo.height = 2

check = CheckBox(app, "tick me")
check.width = 17
check.height = 2

button_group = ButtonGroup(app, ["cheese", "onion", "crisps"], 1)
button_group.width = 35
button_group.height = 9
button_group.bg = "darkgrey"

box = Box(app)

box.width = 100
box.height = 100

box.bg = "red"

app.display()
Esempio n. 2
0
print("Thread setup")

menubar = MenuBar(app,
                  toplevel=["Set Config", "Request State", "View Config"],
                  options=[[["Erase Configuration", eraseConfig],
                            ["Initialise for HAL", initHal],
                            ["Initialise for Encoder", initStandard],
                            ["Initialise for Sensorless", initSensorless]],
                           [["Full", fullCal], ["Motor", motorCal],
                            ["Closed", closedLoop], ["Sensorless", sensorless],
                            ["Encoder", encoder], ["Index", index]],
                           [["Axis0", axis0Config], ["Axis1", axis1Config]]])

y = 0
box = Box(app, grid=[0, y])
box.width = 10
box.height = 50

y = y + 1
text = Text(app, text="current_lim", grid=[0, y])
textbox3 = TextBox(app, text=odrv0.axis0.motor.config.current_lim, grid=[1, y])

y = y + 1
#text = Text(app, text="d_axis_current (<-70.0)", grid=[0,y])
#textbox0 = TextBox(app, text = odrv0.axis0.motor.config.d_axis_current, grid=[1,y])

y = y + 1
text = Text(app, text="vel_gain", grid=[0, y])
textbox1 = TextBox(app,
                   text=odrv0.axis0.controller.config.vel_gain,
                   grid=[1, y])