Daiki Morita
/
UDP_ROS
UDP ROS Communication program
Revision 5:2b2cf11243b1, committed 2021-03-02
- Comitter:
- daikinect
- Date:
- Tue Mar 02 02:22:39 2021 +0900
- Branch:
- test
- Parent:
- 4:4b38a500167b
- Commit message:
- date change test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 02 02:15:24 2021 +0900 +++ b/main.cpp Tue Mar 02 02:22:39 2021 +0900 @@ -13,10 +13,12 @@ #define MAX_LEN 1208 char txdata[MAX_LEN]; char rxdata[MAX_LEN]; +long counter = 0; void initialize_txdata() { // 0123...'A''B''C'... for (int i = 0; i < MAX_LEN; i++) - txdata[i] = i % 0x100; + txdata[i] = (i + counter) % 0x100; + counter++; } int network_init() { @@ -57,7 +59,7 @@ void communication() { while (1) { led3 = !led3; - + initialize_txdata(); if (0 > socket.sendto(pcAddr, txdata, sizeof(txdata))) { printf("eth sending error\n"); }