ok, i made it work with an array of size one :-) (see below)
but now, when i increase to an array of size 2, i still get this:
java.lang.ArrayIndexOutOfBoundsException. code below.
what is the difference bewteen dim1 and 2?? for info, i try to send
something like 00 or FF
// dim1
short[] Cmd = new short[1];
protected RemoteController rc;
int hex;
String b1 = _byte1.getText();
hex = Integer.parseInt(b1.trim(), 16 /* radix */);
Cmd[0] = (short)hex;
rc.sendCommand(Cmd);
with struct in header.h
typedef struct SkyetekM1miniCommand
{
uint8_t M1miniCmd[1];
}SkyetekM1miniCommand;
//*********************************************************
// dim2
short[] Cmd = new short[2];
protected RemoteController rc;
int hex;
String b1 = _byte1.getText();
hex = Integer.parseInt(b1.trim(), 16 /* radix */);
Cmd[0] = (short)hex;
Cmd[1] = (short)hex;
rc.sendCommand(Cmd);
with struct in header.h
typedef struct SkyetekM1miniCommand
{
uint8_t M1miniCmd[2];
}SkyetekM1miniCommand;
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help