Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA:

Fun with full-screen telemetry! 08 Jan 2018 19:06 #13

  • hafromue
  • hafromues Avatar
  • Besucher
  • Besucher
Hallo Guido,

diese All-in-One-Screen-Lösung läuft auf meiner DC-16 für den XSensor von Thomas Lehmann.
Ist nicht der OpenXsensor!! www.jetiforum.de/index.php/do-it-yoursel...force?start=12#83256

Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: von hafromue.

Fun with full-screen telemetry! 08 Jan 2018 20:19 #14

  • skyfreak
  • skyfreaks Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Beiträge: 2946
  • Dank erhalten: 1445
ok dann sollte schon einiges gehen
so viel auf einem screen brauche ich gar nicht
4 areas und die battery in der mitte, das wäre schon cool

geht das dann auch auf der 16 oder kann man so battery symbole da nicht abbilden?

ich komme einfach nicht dazu mich mit lua zu beschäftigen :(

gruss,
guido
Fliegergruss
GUIDO



_________________________________________________________
Too many dicks on the dance floor.
Too many dicks!​


Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Fun with full-screen telemetry! 09 Jan 2018 19:52 #15

  • TeroS
  • TeroSs Avatar Autor
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • RC-Thoughts
  • Beiträge: 527
  • Dank erhalten: 370
16 could maybe do that, I have mot tried it. I'm running the whole RFID-app inside my "full-screen app" so that is not possible in 16.

If you want to make your own here's the drawing of main screen:
----------------------------------------------------------------------
-- Draw the telemetry windows
local function printBattery()
    local txtr,txtg,txtb
    local bgr,bgg,bgb = lcd.getBgColor()
    if (bgr+bgg+bgb)/3 >128 then
        txtr,txtg,txtb = 0,0,0
        else
        txtr,txtg,txtb = 255,255,255
    end
    chgY = 53 + (100 - percVal)
    chgH = percVal
    if(alert == 1) then
        lcd.setColor(240,0,0)
        else
        lcd.setColor(0,220,0)
    end
    lcd.setColor(0,255,0)
    if(redAlert == 1) then
        lcd.setColor(255,0,0)
        lcd.drawRectangle(111,11,89,36,10)
        lcd.drawRectangle(112,12,87,34,10)
        lcd.drawText((310 - lcd.getTextWidth(FONT_MAXI,"LOW"))/2,8,"LOW",FONT_MAXI)
        else
        if (battLow) then
            lcd.setColor(255,0,0)
            lcd.drawRectangle(111,11,89,36,10)
            lcd.drawRectangle(112,12,87,34,10)
            lcd.drawText((310 - lcd.getTextWidth(FONT_MAXI,string.format("%.0f%%",percVal)))/2,8,string.format("%.0f%%",percVal),FONT_MAXI)
            else
            lcd.drawRectangle(111,11,89,36,10)
            lcd.drawRectangle(112,12,87,34,10)
            lcd.drawText((310 - lcd.getTextWidth(FONT_MAXI,string.format("%.0f%%",percVal)))/2,8,string.format("%.0f%%",percVal),FONT_MAXI)
        end
    end
    lcd.drawFilledRectangle(138,chgY,39,chgH)
    lcd.setColor(txtr,txtg,txtb)
 
    -- Battery symbol inside capacity-bar
    lcd.drawRectangle(146,138,22,12)
    lcd.drawRectangle(147,139,20,10)
    lcd.drawFilledRectangle(144,141,3,5)
 
    -- Outline
    lcd.drawRectangle(136,51,42,104)
    lcd.drawRectangle(137,52,40,102)
    collectgarbage()
end
----------------------------------------------------------------------
local function display(width,height)
    --if (tagValid == 1 and percVal > 0) then
    if(1 == 1) then
        -- Headspeed
        lcd.drawText(22,5,"Headspeed",FONT_MINI)
        lcd.drawText(84 - lcd.getTextWidth(FONT_MAXI,string.format("%.0f",rpmValue)),13,string.format("%.0f",rpmValue),FONT_MAXI)
        lcd.drawText(86,35,"rpm",FONT_MINI)
        lcd.drawText(12,49,"Min/Max:",FONT_MINI)
        lcd.drawText(65,49,string.format("%s - %s", rpmMin, rpmMax),FONT_MINI)
 
        -- Current
        lcd.drawText(20,71,"Motor Current",FONT_MINI)
        lcd.drawText(95 - lcd.getTextWidth(FONT_MAXI,string.format("%.1f",curValue)),78,string.format("%.1f",curValue),FONT_MAXI)
        lcd.drawText(95,101,"A",FONT_MINI)
        lcd.drawText(12,113,"Min/Max:",FONT_MINI)
        lcd.drawText(65,113,string.format("%s - %s", curMin, curMax),FONT_MINI)
 
        -- Battery info
        --lcd.drawText(225,5,"Battery Info",FONT_MINI)
        lcd.drawText(310 - lcd.getTextWidth(FONT_MINI,string.format("%s",battDspName)),5,string.format("%s",battDspName),FONT_MINI)
        lcd.drawText(285 - lcd.getTextWidth(FONT_MAXI,string.format("%.0f",mahCapaLog)),13,string.format("%.0f",mahCapaLog),FONT_MAXI)
        lcd.drawText(287,35,"mAh",FONT_MINI)
        lcd.drawText(310 - lcd.getTextWidth(FONT_MINI,string.format("Flightlog: %.0f Cycles",tagCount)),49,string.format("Flightlog: %.0f Cycles",tagCount),FONT_MINI)
 
        -- Timer
        lcd.drawText(225,71,"Flight Time",FONT_MINI)
        lcd.drawText(295 - lcd.getTextWidth(FONT_MAXI,fTimer),78,fTimer,FONT_MAXI)
        lcd.drawText(213,113,"Date:",FONT_MINI)
        lcd.drawText(243,113,today,FONT_MINI)
 
        -- Bottom values
        -- Rx Voltage
        lcd.drawText(5,138,"Rx:",FONT_NORMAL)
        lcd.drawText(52 - lcd.getTextWidth(FONT_BIG,string.format("%.1f",rxV)),135,string.format("%.1f",rxV),FONT_BIG)
        lcd.drawText(53,138,"V",FONT_NORMAL)
        -- Rx Quality
        lcd.drawText(66,138,"Q:",FONT_NORMAL)
        lcd.drawText(110 - lcd.getTextWidth(FONT_BIG,string.format("%.0f",rxQ)),135,string.format("%.0f",rxQ),FONT_BIG)
        lcd.drawText(111,138,"%",FONT_NORMAL)
        -- Batt Temps
        lcd.drawText(185,138,"LiPo:",FONT_NORMAL)
        lcd.drawText(265 - lcd.getTextWidth(FONT_BIG,string.format("%.1f/",battA)),135,string.format("%.1f/",battA),FONT_BIG)
        lcd.drawText(299 - lcd.getTextWidth(FONT_BIG,string.format("%.1f",battB)),135,string.format("%.1f",battB),FONT_BIG)
        lcd.drawText(300,138,"°C",FONT_NORMAL)
 
        -- Draw battery
        printBattery()
        -- Lines x,y,width,height
        lcd.setColor(183,28,28)
        lcd.drawFilledRectangle(5,67,115,2) -- Left middle
        lcd.drawFilledRectangle(197,67,115,2) -- Right middle
        lcd.drawFilledRectangle(5,131,115,2) -- Left bottom
        lcd.drawFilledRectangle(197,131,115,2) -- Right bottom
 
        lcd.setColor(244,67,44) 
        lcd.drawFilledRectangle(0,0,329,3) -- Long line to center main label
        collectgarbage()
        else
        lcd.drawImage((310-image.width)/2, -17, image)
        lcd.setColor(244,67,44)
        lcd.drawFilledRectangle(0,0,329,2) -- Long line to center main label
    end
    collectgarbage()
end
----------------------------------------------------------------------

Remember to register the screen with:
system.registerTelemetry(1,"        Logo 800 Xxtreme  -  Powered by RC-Thoughts.com",4,display)
Folgende Benutzer bedankten sich: skyfreak, IG-Modellbau

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Fun with full-screen telemetry! 09 Jan 2018 21:38 #16

  • hafromue
  • hafromues Avatar
  • Besucher
  • Besucher
And with this line you must not write the Model name in your App fixed.

model = system.getProperty("Model")

you should write it inside the Init function and use "function init (code1)"

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: von hafromue.

Fun with full-screen telemetry! 09 Jan 2018 21:43 #17

  • TeroS
  • TeroSs Avatar Autor
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • RC-Thoughts
  • Beiträge: 527
  • Dank erhalten: 370
Easier to write it fixed when I wanted it placed in a certain way. And as wrote, I made the app for myself so it didn't matter.
Folgende Benutzer bedankten sich: hafromue

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Fun with full-screen telemetry! 09 Jan 2018 21:54 #18

  • hafromue
  • hafromues Avatar
  • Besucher
  • Besucher
To place the model name in a certain way in your App is not the Problem.
You have the Model name in the variable "model" and can place it where ever you want. Inthe headline of the Telemetriewindow, like a formheader and so on.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.324 Sekunden
Powered by Kunena Forum