English
Source / code snippets

Ansteuern display G510s Keyboard lcd Snake use

 
G510s Keyboard LCD display Snake use Ansteuern

have me yesterday for 55 Euro with Saturn a keyboard bought: G510s



Tolles part, Keys super - therefore bought. Schreibgefühl fine and only thereafter exquisite.

however, the part has one LCD-display.

however, the want we naturally use with XProfan.



so with Pixel and settle and Delete - So one Snake:



here the code circa Own APPs for the display produce to with NativeProfanFree:  [...] 
 {$cleq}
//g510s lcd (160x43x1) display usage with XProfan
DEF LogiLcdInit(2) ! "LogitechLcd.dll","LogiLcdInit"
DEF LogiLcdIsConnected(1) ! "LogitechLcd.dll","LogiLcdIsConnected"
DEF LogiLcdMonoSetBackground(2) ! "LogitechLcd.dll","LogiLcdMonoSetBackground"
DEF LogiLcdUpdate(0) ! "LogitechLcd.dll","LogiLcdUpdate"
declare g510&
cls
g510.createDisplay()
long x=80,y=20

do {

    g510.setPixel(x,y,getTickCount\300 mod 2)
    g510.refresh(1)
    waitinput 300
    g510.setPixel(x,y,true)

    select %scankey

        caseof 37 : dec x

        caseof 38 : dec y

        caseof 39 : inc x

        caseof 40 : inc y

    endselect

}

end
//

g510.createDisplay(){

    usedll("LogitechLcd.dll")
    LogiLcdInit("X\zP\zr\zo\zf\za\zn\z.\zN\ze\zt\z\z" ,1)
    g510&=globalAlloc(gPTR,8192)
    rtlZeroMemory(g510&,8192)

}

nproc g510.cls{

    global g510&
    rtlZeroMemory(g510&,8192)

}

nproc g510.setPixel(long x,y,pixel){

    global g510&
    add x,y*160
    setbyte g510&,x,pixel+127

}

g510.refresh(long disp){

    LogiLcdMonoSetBackground(g510&,8192)
    LogiLcdUpdate(1)

}


video:
Download

Exe:
Download

Nachtrag:

plenty schöner would still directly one hPic on the LCD Send to,
bitteschön:


 {$cleq}
//g510s lcd (160x43x1) display usage with XProfan
decimals 0
declare g510&,g510Pixels&
include pixels.inc
DEF LogiLcdInit(2) ! "LogitechLcd.dll","LogiLcdInit"
DEF LogiLcdIsConnected(1) ! "LogitechLcd.dll","LogiLcdIsConnected"
DEF LogiLcdMonoSetBackground(2) ! "LogitechLcd.dll","LogiLcdMonoSetBackground"
DEF LogiLcdUpdate(0) ! "LogitechLcd.dll","LogiLcdUpdate"
windowstyle 512 | 80
window 0,0 - 0,0
g510.createDisplay()

do {

    g510.startPaint()
    cls 0
    color 15,0
    print "XProfan on G510s"
    g510.EndPaint()
    waitinput 10000

}

end
//
g510.startPaint(){pixels.startPaint(g510Pixels&)}

g510.EndPaint(){

    pixels.endpaint()
    pixels.renewPixels(g510Pixels&)
    //pixels.drawSizedHPic(g510Pixels&,0,0,width(hwnd),height(hwnd),0)
    g510.pixels2lcd(g510Pixels&)
    g510.refresh(1)
    pixels.EndPaint()

}

nProc g510.pixels2lcd(long pix){

    global g510&
    long p=0

    whileloop 0,6880 {

        setbyte g510&,loop,byte(pix,p)
        add p,4

    }

}

g510.createDisplay(){

    usedll("LogitechLcd.dll")
    LogiLcdInit("X\zP\zr\zo\zf\za\zn\z.\zN\ze\zt\z\z" ,1)
    g510&=globalAlloc(gPTR,8192)
    rtlZeroMemory(g510&,8192)
    g510Pixels&=pixels.createHPic(160,43,0)

}

nproc g510.cls{

    global g510&
    rtlZeroMemory(g510&,8192)

}

nproc g510.setPixel(long x,y,pixel){

    global g510&
    add x,y*160
    setbyte g510&,x,pixel+127

}

g510.refresh(long disp){

    LogiLcdMonoSetBackground(g510&,8192)
    LogiLcdUpdate(1)

}


and now should the part same yet whom last call on of my FritzBox Show... Tada:



Download/ into Cart
4,99 €
inkl. MwSt.
no Shipping fee

513 kB
Hochgeladen:12/20/15
Downloadcounter184
Download
17.420 kB
Hochgeladen:12/20/15
Downloadcounter296
Download
79 kB
Hochgeladen:12/20/15
Downloadcounter195
Download
49 kB
Hochgeladen:12/20/15
Downloadcounter195
Download
536 kB
Hochgeladen:12/20/15
Downloadcounter15
Download
664 kB
Hochgeladen:12/20/15
Downloadcounter197
Download
40 kB
Hochgeladen:12/20/15
Downloadcounter220
Download
 
12/20/15  
 



plenty schöner would still directly one hPic on the LCD Send to,
bitteschön:


 {$cleq}
//g510s lcd (160x43x1) display usage with XProfan
decimals 0
declare g510&,g510Pixels&
include pixels.inc
DEF LogiLcdInit(2) ! "LogitechLcd.dll","LogiLcdInit"
DEF LogiLcdIsConnected(1) ! "LogitechLcd.dll","LogiLcdIsConnected"
DEF LogiLcdMonoSetBackground(2) ! "LogitechLcd.dll","LogiLcdMonoSetBackground"
DEF LogiLcdUpdate(0) ! "LogitechLcd.dll","LogiLcdUpdate"
windowstyle 512 | 80
window 0,0 - 0,0
g510.createDisplay()

do {

    g510.startPaint()
    cls 0
    color 15,0
    print "XProfan on G510s"
    g510.EndPaint()
    waitinput 10000

}

end
//
g510.startPaint(){pixels.startPaint(g510Pixels&)}

g510.EndPaint(){

    pixels.endpaint()
    pixels.renewPixels(g510Pixels&)
    //pixels.drawSizedHPic(g510Pixels&,0,0,width(hwnd),height(hwnd),0)
    g510.pixels2lcd(g510Pixels&)
    g510.refresh(1)
    pixels.EndPaint()

}

nProc g510.pixels2lcd(long pix){

    global g510&
    long p=0

    whileloop 0,6880 {

        setbyte g510&,loop,byte(pix,p)
        add p,4

    }

}

g510.createDisplay(){

    usedll("LogitechLcd.dll")
    LogiLcdInit("X\zP\zr\zo\zf\za\zn\z.\zN\ze\zt\z\z" ,1)
    g510&=globalAlloc(gPTR,8192)
    rtlZeroMemory(g510&,8192)
    g510Pixels&=pixels.createHPic(160,43,0)

}

nproc g510.cls{

    global g510&
    rtlZeroMemory(g510&,8192)

}

nproc g510.setPixel(long x,y,pixel){

    global g510&
    add x,y*160
    setbyte g510&,x,pixel+127

}

g510.refresh(long disp){

    LogiLcdMonoSetBackground(g510&,8192)
    LogiLcdUpdate(1)

}


and now should the part same yet whom last call on of my FritzBox Show... Tada:  [...] 

 
12/20/15  
 



and weils so beautiful is:



Nu but enough with G510-Tastaturkram...

nevertheless tolles part!

799 kB
Hochgeladen:12/20/15
Downloadcounter186
Download
 
12/20/15  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.245 Views

Untitledvor 0 min.
RGH12/26/21
p.specht11/20/21
E.T.11/20/21
Manfred Barei11/19/21
More...

Themeninformationen

this Topic has 1 subscriber:

iF (3x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie