X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=apps%2Ftosthreads%2Fcapps%2FTestCollection%2FTestCollection.c;h=75da72871f886ef6b17fb27fc3fc351e041b1276;hb=ea002ecd1bf3ec3937310352ede53480cea89485;hp=f0b417fbf97b92fc6ee344a3aeab823bb8396fc4;hpb=054553520509ec36889269674d9b92890e2cb9cb;p=tinyos-2.x.git diff --git a/apps/tosthreads/capps/TestCollection/TestCollection.c b/apps/tosthreads/capps/TestCollection/TestCollection.c index f0b417fb..75da7287 100644 --- a/apps/tosthreads/capps/TestCollection/TestCollection.c +++ b/apps/tosthreads/capps/TestCollection/TestCollection.c @@ -64,7 +64,10 @@ void tosthread_main(void* arg) { collectionSetRoot(); for (;;) { if ( collectionReceive(&recvbuf, 0, AM_OSCILLOSCOPE) == SUCCESS) { - amSerialSend(AM_BROADCAST_ADDR, &recvbuf, sizeof(local), AM_OSCILLOSCOPE); + oscilloscope_t *recv_o = (oscilloscope_t *) collectionGetPayload(&recvbuf, sizeof(oscilloscope_t)); + oscilloscope_t *send_o = (oscilloscope_t *) serialGetPayload(&sendbuf, sizeof(oscilloscope_t)); + memcpy(send_o, recv_o, sizeof(oscilloscope_t)); + amSerialSend(AM_BROADCAST_ADDR, &sendbuf, sizeof(local), AM_OSCILLOSCOPE); report_received(); } }