| |
|
|
| G510s Keyboard LCD Display Snake Verwenden Ansteuern
Posesiones me gestern para 55 Euro en Saturn una Tastatur gekauft: G510s
Tolles Teil, Tasten super - por lo tanto gekauft. Schreibgefühl herrlich y sólo danach ausgesucht.
Como De todos modos, el Teil ha una LCD-Display.
Como De todos modos, el querer wir natürlich uso con XProfan.
So con Pixel y Setzen y Löschen - Así que una Snake:
Hier el Code en propio PFA para el Display herstellen a puede con 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"
declarar 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)
seleccionar %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: Descargar
Exe: Descargar
Apéndice:
Viel schöner wäre doch direkt una hPic a el LCD senden a puede, bitteschön:
{$cleq}
//g510s lcd (160x43x1) display usage with XProfan
decimals 0
declarar 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
imprimir "XProfan en 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&,bucle,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)
}
Und ahora debería el Teil igual todavía el letzten Anruf en meiner FritzBox Mostrar... Tada:
Descargar/ In el Warenkorb4,99 € inkl. MwSt. no Versandgebühr |
|
|
| |
|
|
|
| Viel schöner wäre doch direkt una hPic a el LCD senden a puede, bitteschön:
{$cleq}
//g510s lcd (160x43x1) display usage with XProfan
decimals 0
declarar 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
imprimir "XProfan en 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&,bucle,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)
}
Und ahora debería el Teil igual todavía el letzten Anruf en meiner FritzBox Mostrar... Tada: [...]
|
|
|
| |
|
|
|
| Und weils así schön es:
Nu aber genug con G510-Tastaturkram...
trotzdem tolles Teil! |
|
|
| |
|
|