Subject:
|
Re: Remote Message Buttons
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 1 Sep 2004 19:58:29 GMT
|
Viewed:
|
7126 times
|
| |
| |
(reviving an old thread...)
> Anyone had problems getting the message 1,2,3 buttons working with brickOS?
> All other remote buttons are working.
I have exactly the same problem. I receive every keys except the three message
keys (see sample code below - the final target will be to use the remote to
control several motors on several RCX).
Any idea ?
Thanks in advance,
Philo
------------------------------------------------
#include <conio.h>
#include <remote.h>
#include <rom/lcd.h>
unsigned int RemoteBits;
int remote(unsigned int etype, unsigned int key)
{
if(etype == LREVT_KEYON)
{
RemoteBits |= key;
}
else if(etype == LREVT_KEYOFF)
{
RemoteBits &= ~key;
}
cputw(RemoteBits);
return 1;
}
int main(int argc, char **argv) {
cputs("remot");
sleep(1);
lr_init();
lr_startup();
lr_set_handler(remote);
while(1)
{
if((RemoteBits & LRKEY_STOP) != 0)
{
cputs("stop");
msleep(300);
cls();
lr_shutdown();
return(0);
}
msleep(20);
}
}
------------------------------------------------
|
|
Message is in Reply To:
| | Remote Message Buttons
|
| Hello, Anyone had problems getting the message 1,2,3 buttons working with brickOS? All other remote buttons are working. I am using v0.2.6.10. I looked through the kernel and includes, it looks like in lr_process(), the lr_keys gets checked vs. (...) (21 years ago, 8-Dec-03, to lugnet.robotics.rcx.legos)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|