Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo TF Team,

 

es scheint, als könnte man einen Button nicht exakt bündig zum rechten oder unteren Rand platzieren - wenn man den letzten Pixel nutzt wird der Button nicht mehr angezeigt

 

Beispiel

    lcd_128x64_set_gui_button(lcd, 0, 0, 47, 21, 16, "XX");

=> geht: 47 mit 16 Höhe => letzter Pixel ist in Zeile 62 (nicht 63 !)

 

    lcd_128x64_set_gui_button(lcd, 0, 0, 48, 21, 16, "XX");

=> geht nicht mehr, Button wird nicht angezeigt

 

Ist das so gewollt oder eher ein Bricklet Bug, der auf "y + height >= 64" prüft. Letzeres stimmt eigentlich nicht, denn bei y=63 und Höhe=1 liegt der Button ja noch in Zeile 63 - oder ?

Geschrieben

Du hattest exakt recht mit deiner Vermutung! Den gleichen Bug gab es auch noch beim Slider.

 

Neue Firmware ist veröffentlicht, hab das getestet mit:

 

/usr/bin/env python
# -*- coding: utf-8 -*-

HOST = "localhost"
PORT = 4223
UID = "GK7" # Change XYZ to the UID of your LCD 128x64 Bricklet

from tinkerforge.ip_connection import IPConnection
from tinkerforge.bricklet_lcd_128x64 import BrickletLCD128x64

if __name__ == "__main__":
    ipcon = IPConnection() # Create IP connection
    lcd = BrickletLCD128x64(UID, ipcon) # Create device object

    ipcon.connect(HOST, PORT) # Connect to brickd
    # Don't use device before ipcon is connected

    # Clear display
    lcd.clear_display()
    lcd.remove_all_gui()

    lcd.set_gui_button(0, 100, 50, 28, 14, 'test')

    lcd.set_gui_slider(0, 0, 0, 128, 0, 50)
    lcd.set_gui_slider(1, 0, 30, 34, 1, 10)

    raw_input("Press key to exit\n") # Use input() in Python 3
    ipcon.disconnect()

 

Der Button und beide Slider tauchen in 2.0.5 nicht auf, funktionieren aber in der neuen 2.0.6.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.