![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
20160725
Revision 2:388988e5733a, committed 2016-07-25
- Comitter:
- liyi
- Date:
- Mon Jul 25 06:58:49 2016 +0000
- Parent:
- 1:a78e5f6154d3
- Commit message:
- C change to c_to_send;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jul 25 06:38:27 2016 +0000 +++ b/main.cpp Mon Jul 25 06:58:49 2016 +0000 @@ -170,7 +170,7 @@ while(1) { cs = 0; - for (const char *p = "32\n" ; c_for_get = *p; p++) + for (const char *p_get = "32\n" ; c_for_get = *p_get; p_get++) { spi.write (c_for_get); } @@ -272,9 +272,9 @@ sprintf(send_array, "%.1f %.1f %.1f\n", Current_X[0], Current_X[1], Current_X[2]); cs = 0; - for (const char *p = send_array ; c = *p; p++) //尚未實測 + for (const char *p_send = send_array ; c_for_send = *p_send; p_send++) //尚未實測 { - spi.write (c); + spi.write (c_for_send); } wait(0.1); cs = 1;