| |
|
|
| 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 Cart4,99 € inkl. MwSt. no Shipping fee |
|
|
| |
|
|
|
| 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: [...]
|
|
|
| |
|
|
|
| and weils so beautiful is:
Nu but enough with G510-Tastaturkram...
nevertheless tolles part! |
|
|
| |
|
|