收到xy自动缩放
Dependencies: MQTT SDFileSystem WIZnet_Library mbed
Fork of wmx_laser by
test.txt@10:3c154d398def, 2018-08-03 (annotated)
- Committer:
- xmwmx
- Date:
- Fri Aug 03 09:45:20 2018 +0000
- Revision:
- 10:3c154d398def
?????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xmwmx | 10:3c154d398def | 1 | int numbers[100][3]; |
xmwmx | 10:3c154d398def | 2 | void str2numbers(char buf[]) |
xmwmx | 10:3c154d398def | 3 | { |
xmwmx | 10:3c154d398def | 4 | pc.printf("%s\r\n",buf); |
xmwmx | 10:3c154d398def | 5 | char *p = buf; |
xmwmx | 10:3c154d398def | 6 | int index = 0; |
xmwmx | 10:3c154d398def | 7 | int a,x,y,z; |
xmwmx | 10:3c154d398def | 8 | while(true) |
xmwmx | 10:3c154d398def | 9 | { |
xmwmx | 10:3c154d398def | 10 | p = strchr(p, '('); |
xmwmx | 10:3c154d398def | 11 | if(!p) break; |
xmwmx | 10:3c154d398def | 12 | p++; |
xmwmx | 10:3c154d398def | 13 | sscanf(p, "%d%d%d",&x,&y,&z); |
xmwmx | 10:3c154d398def | 14 | pc.printf("%d %d %d \r\n",x,y,z); |
xmwmx | 10:3c154d398def | 15 | numbers[index][0] = x; |
xmwmx | 10:3c154d398def | 16 | numbers[index][1] = y; |
xmwmx | 10:3c154d398def | 17 | numbers[index][2] = z; |
xmwmx | 10:3c154d398def | 18 | index++; |
xmwmx | 10:3c154d398def | 19 | } |
xmwmx | 10:3c154d398def | 20 | |
xmwmx | 10:3c154d398def | 21 | } |
xmwmx | 10:3c154d398def | 22 |