fixed line endings
This commit is contained in:
parent
3bf99ca040
commit
9e14d09bb0
29 changed files with 2128 additions and 2128 deletions
|
@ -1,27 +1,27 @@
|
|||
/*
|
||||
* Example Contiki test script (JavaScript).
|
||||
* A Contiki test script acts on mote output, such as via printf()'s.
|
||||
* The script may operate on the following variables:
|
||||
* Mote mote, int id, String msg
|
||||
*/
|
||||
|
||||
/* Wait until node has booted */
|
||||
WAIT_UNTIL(msg.startsWith('Starting'));
|
||||
log.log("Mote started\n");
|
||||
mymote = mote; /* store mote reference */
|
||||
|
||||
/* Wait 3 seconds (3000ms) */
|
||||
GENERATE_MSG(3000, "continue");
|
||||
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* Write command to serial port */
|
||||
log.log("Writing 'ls' to mote serial port\n");
|
||||
write(mymote, "ls");
|
||||
|
||||
/* Read replies */
|
||||
while (true) {
|
||||
YIELD();
|
||||
if (mote == mymote) {
|
||||
log.log("Mote replied: " + msg + "\n");
|
||||
}
|
||||
/*
|
||||
* Example Contiki test script (JavaScript).
|
||||
* A Contiki test script acts on mote output, such as via printf()'s.
|
||||
* The script may operate on the following variables:
|
||||
* Mote mote, int id, String msg
|
||||
*/
|
||||
|
||||
/* Wait until node has booted */
|
||||
WAIT_UNTIL(msg.startsWith('Starting'));
|
||||
log.log("Mote started\n");
|
||||
mymote = mote; /* store mote reference */
|
||||
|
||||
/* Wait 3 seconds (3000ms) */
|
||||
GENERATE_MSG(3000, "continue");
|
||||
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* Write command to serial port */
|
||||
log.log("Writing 'ls' to mote serial port\n");
|
||||
write(mymote, "ls");
|
||||
|
||||
/* Read replies */
|
||||
while (true) {
|
||||
YIELD();
|
||||
if (mote == mymote) {
|
||||
log.log("Mote replied: " + msg + "\n");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue