Bitte ändert euer Passwort!
Im März 2026 wurde das Forum gehackt. Dabei hatten die Angreifer Zugriff auf die Datenbank und somit Zugriff auf eure Passwörter. Auch wenn das Forum kein Passwort im Klartext speichert, können die Angreifer eure Passwörter knacken. Bitte ändert daher dringend euer Passwort für das Forum. Solltet ihr das gleiche Passwort auch an anderer Stelle verwenden, ändert es bitte unbedingt an allen Stellen!
So geht es:
Anleitung Passwort ändern
Display-Hi-App V7.1.0f
- Helischober
-
- Offline
- Platinum Mitglied
-
- Beiträge: 501
- Thanks: 169
Re: Display-Hi-App V7.1.0f
Today 12:17
Hallo Holger,
das wäre Nett.
hier ein paar Code -Zeilen. Vielleicht hilft dies dir ja weiter:
local author = "JETI model / Custom"
local version = "1.2"
-- Liste aller aktiven Servos (wird dynamisch befüllt)
local activeServos = {}
local function printForm()
lcd.drawText(10, 5, "JETI Servo Live-Abfrage", FONT_BOLD)
lcd.drawRectangle(10, 23, 300, 2) -- Trennlinie
-- Schleife über alle tatsächlich im Modell gefundenen aktiven Kanäle
for idx, servo in ipairs(activeServos) do
-- Die Zeilenposition verschiebt sich für jeden Kanal automatisch nach unten
local yPos = 12 + (idx * 20)
-- "O" + ID holt den aktuellen Ausgabewert des spezifischen Servokanals (z.B. "O1", "O5")
local servoValue = system.getInputs("O" .. servo.id)
if servoValue then
-- Umrechnung des Werts (-1.0 bis +1.0) in Prozent (-100% bis +100%)
local percent = math.floor(servoValue * 100)
lcd.drawText(10, yPos, servo.label .. ":", FONT_NORMAL)
lcd.drawText(140, yPos, percent .. " %", FONT_BOLD)
else
lcd.drawText(10, yPos, servo.label .. ":", FONT_NORMAL)
lcd.drawText(140, yPos, "---", FONT_MINI)
end
end
end
local function init()
-- Dynamisches Auslesen aller konfigurierten Servos aus dem Modell
local servos = system.getServos()
if servos then
for _, servo in pairs(servos) do
-- Nur Servos übernehmen, die eine gültige ID und Bezeichnung besitzen
if servo["id"] and servo["label"] then
table.insert(activeServos, {
id = servo["id"],
label = servo["label"]
})
end
end
-- Kanäle nach ihrer echten ID sortieren (z.B. Kanal 1, Kanal 2, Kanal 3...)
table.sort(activeServos, function(a, b) return a.id < b.id end)
end
-- Registriert das dynamische Formular im Hauptmenü unter "Servo Live-Werte"
system.registerForm(1, MENU_MAIN, "Servo Live-Werte", nil, nil, printForm)
end
local function loop()
-- Bleibt leer, da das Display via printForm automatisch zyklisch gezeichnet wird
end
return {init=init, loop=loop, author=author, version=version}
LG Achim
das wäre Nett.
hier ein paar Code -Zeilen. Vielleicht hilft dies dir ja weiter:
local author = "JETI model / Custom"
local version = "1.2"
-- Liste aller aktiven Servos (wird dynamisch befüllt)
local activeServos = {}
local function printForm()
lcd.drawText(10, 5, "JETI Servo Live-Abfrage", FONT_BOLD)
lcd.drawRectangle(10, 23, 300, 2) -- Trennlinie
-- Schleife über alle tatsächlich im Modell gefundenen aktiven Kanäle
for idx, servo in ipairs(activeServos) do
-- Die Zeilenposition verschiebt sich für jeden Kanal automatisch nach unten
local yPos = 12 + (idx * 20)
-- "O" + ID holt den aktuellen Ausgabewert des spezifischen Servokanals (z.B. "O1", "O5")
local servoValue = system.getInputs("O" .. servo.id)
if servoValue then
-- Umrechnung des Werts (-1.0 bis +1.0) in Prozent (-100% bis +100%)
local percent = math.floor(servoValue * 100)
lcd.drawText(10, yPos, servo.label .. ":", FONT_NORMAL)
lcd.drawText(140, yPos, percent .. " %", FONT_BOLD)
else
lcd.drawText(10, yPos, servo.label .. ":", FONT_NORMAL)
lcd.drawText(140, yPos, "---", FONT_MINI)
end
end
end
local function init()
-- Dynamisches Auslesen aller konfigurierten Servos aus dem Modell
local servos = system.getServos()
if servos then
for _, servo in pairs(servos) do
-- Nur Servos übernehmen, die eine gültige ID und Bezeichnung besitzen
if servo["id"] and servo["label"] then
table.insert(activeServos, {
id = servo["id"],
label = servo["label"]
})
end
end
-- Kanäle nach ihrer echten ID sortieren (z.B. Kanal 1, Kanal 2, Kanal 3...)
table.sort(activeServos, function(a, b) return a.id < b.id end)
end
-- Registriert das dynamische Formular im Hauptmenü unter "Servo Live-Werte"
system.registerForm(1, MENU_MAIN, "Servo Live-Werte", nil, nil, printForm)
end
local function loop()
-- Bleibt leer, da das Display via printForm automatisch zyklisch gezeichnet wird
end
return {init=init, loop=loop, author=author, version=version}
LG Achim
Phecda 680 E; Goblin 380 ; Goblin 570-3-Blatt; Kraken 580; Bell 222 /600er (D-HNIC) ; LOGO 550SE ; DC 16 II und DC 24 II
Folgende Benutzer bedankten sich: theTall
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Helischober
-
- Offline
- Platinum Mitglied
-
- Beiträge: 501
- Thanks: 169
Re: Display-Hi-App V7.1.0f
Today 12:28
Hallo Holger,
und dies Steht in der 6.5
function ka.drawServo(x, y)
local text, font, width
font = FONT_MINI
text = trans.servos
width = lcd.getTextWidth(font, text)
changeColor(colors.color12)
drawKaBackground(x + 2, y + 0, 128, 36)
setColor_Black()
lcd.drawText(x + 66 - width/2, y - 1, text, font)
font = FONT_MAXI
text = string.format("%.0f%%", 100 * val)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 98 - width, y + 3, text, font)
font = FONT_MINI
text = string.format("%.0f%%", 100 * maxval)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 128 - width, y + 12, text, font)
font = FONT_MINI
text = string.format("%.0f%%", 100 * minval)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 128 - width, y + 25, text, font)
end
LG achim
und dies Steht in der 6.5
function ka.drawServo(x, y)
local text, font, width
font = FONT_MINI
text = trans.servos
width = lcd.getTextWidth(font, text)
changeColor(colors.color12)
drawKaBackground(x + 2, y + 0, 128, 36)
setColor_Black()
lcd.drawText(x + 66 - width/2, y - 1, text, font)
font = FONT_MAXI
text = string.format("%.0f%%", 100 * val)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 98 - width, y + 3, text, font)
font = FONT_MINI
text = string.format("%.0f%%", 100 * maxval)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 128 - width, y + 12, text, font)
font = FONT_MINI
text = string.format("%.0f%%", 100 * minval)
width = lcd.getTextWidth(font, text)
lcd.drawText(x + 128 - width, y + 25, text, font)
end
LG achim
Phecda 680 E; Goblin 380 ; Goblin 570-3-Blatt; Kraken 580; Bell 222 /600er (D-HNIC) ; LOGO 550SE ; DC 16 II und DC 24 II
Folgende Benutzer bedankten sich: theTall
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- theTall
- Abwesend
- Premium Mitglied
-
- Beiträge: 148
- Thanks: 182
Re: Display-Hi-App V7.1.0f
Today 15:32 - Today 15:35
Hallo Achim, danke für Deine Rückmeldung. Ich habe die Firmwarefunktion "system.getServos()" verwendet und es in die TeleValues integriert, siehe Bilder. Meinem Urlaub sei Dank.
Bei der Projektierung bekommt man eine Liste mit allen verfügbaren Servoausgängen.
Ich hoffe Deine Anmerkung richtig verstanden zu haben.
Gruß Holger
Bei der Projektierung bekommt man eine Liste mit allen verfügbaren Servoausgängen.
Ich hoffe Deine Anmerkung richtig verstanden zu haben.
Gruß Holger
Letzte Änderung: Today 15:35 von theTall.
Folgende Benutzer bedankten sich: IG-Modellbau
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
Moderatoren: Thorn, IG-Modellbau
Ladezeit der Seite: 0.560 Sekunden