![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
master to control sensor node
Dependencies: mbed
Diff: gateway.cpp
- Revision:
- 4:5518470323de
- Parent:
- 3:646a628b8656
- Child:
- 5:85fea4ceaa1f
--- a/gateway.cpp Tue Nov 10 23:37:54 2015 +0000 +++ b/gateway.cpp Tue Nov 10 23:44:36 2015 +0000 @@ -68,23 +68,23 @@ //for(uint8_t i = 0; i < len+8; i++) { //prepend the 8-byte header //send_buf[i] = (i<8) ? header[i] : data[i-8]; - } +// } //pc.printf("Sent: %s\r\n", send_buf+8); //for(unit8_t i = 0; i < len; i++){ //} - mrf.Send((unit8_t *) data, (len*4)+4); + mrf.Send((uint8_t *) data, (len*4)+4); //free(send_buf); } int main() { mrf.SetChannel(15); int nodes = 6; - char buffer[128]; + // char buffer[128]; packet buffer(NODE,2,HELLO_TYPE,4.0,5.0); - rf_send(buffer, 2); + rf_send(&buffer, 2); /* while(1) { pc.printf("Select operation: \r\n"); pc.printf("1) get node list\r\n"); @@ -118,5 +118,5 @@ break; } */ - } + //} }