mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
- rcsim: fix compiler warning
This commit is contained in:
@@ -180,7 +180,7 @@ int main (int argc, char **argv){
|
|||||||
int evd;
|
int evd;
|
||||||
unsigned long sendcode=KEY_0;
|
unsigned long sendcode=KEY_0;
|
||||||
unsigned int keys = sizeof(keyname)/sizeof(struct key);
|
unsigned int keys = sizeof(keyname)/sizeof(struct key);
|
||||||
unsigned long time=0;
|
unsigned long rctime=0;
|
||||||
unsigned long reptime=500;
|
unsigned long reptime=500;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ int main (int argc, char **argv){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argc>=3){
|
if (argc>=3){
|
||||||
time=(atol (argv[2])*1000)/reptime;
|
rctime=(atol (argv[2])*1000)/reptime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DBOX_HARDWARE
|
#ifdef HAVE_DBOX_HARDWARE
|
||||||
@@ -224,13 +224,13 @@ int main (int argc, char **argv){
|
|||||||
#else
|
#else
|
||||||
evd = -1; // close(-1) does not harm... ;)
|
evd = -1; // close(-1) does not harm... ;)
|
||||||
#endif
|
#endif
|
||||||
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*time)/1000);
|
printf ("sending key %s for %ld seconds\n",keyname[offset].name,(reptime*rctime)/1000);
|
||||||
if (push (evd,sendcode,KEY_PRESSED)<0){
|
if (push (evd,sendcode,KEY_PRESSED)<0){
|
||||||
perror ("writing 'key_pressed' event failed");
|
perror ("writing 'key_pressed' event failed");
|
||||||
close (evd);
|
close (evd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
while (time--){
|
while (rctime--){
|
||||||
usleep(reptime*1000);
|
usleep(reptime*1000);
|
||||||
if (push (evd,sendcode,KEY_AUTOREPEAT)<0){
|
if (push (evd,sendcode,KEY_AUTOREPEAT)<0){
|
||||||
perror ("writing 'key_autorepeat' event failed");
|
perror ("writing 'key_autorepeat' event failed");
|
||||||
|
Reference in New Issue
Block a user