![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is probably never gonna get done
Diff: main.cpp
- Revision:
- 22:de980b82d0ce
- Parent:
- 21:34f440ae0227
diff -r 34f440ae0227 -r de980b82d0ce main.cpp --- a/main.cpp Wed Mar 20 12:45:06 2019 +0000 +++ b/main.cpp Wed Mar 20 16:50:01 2019 +0000 @@ -146,7 +146,7 @@ pc.printf("Rotation command\n\r"); break; case MAX_SPEED_CMD : - pc.printf("Max speed command\n\r"); + pc.printf("Max speed set to: %2.1f\n\r", mail->fdata); break; case R_ECHO1 : pc.printf("Rotor command:\n\r"); @@ -155,13 +155,6 @@ case R_ECHO2 : pc.printf("Partial rotation: %d\n\r", mail->data); break; - case MAX_SPEED_ECHO1 : - pc.printf("Max speed command:\n\r"); - pc.printf("Max speed int: %d\n\r", mail->data); - break; - case MAX_SPEED_ECHO2 : - pc.printf("Max speed decimal: %d\n\r", mail->data); - break; case KEY_ECHO : pc.printf("Received key: %016llx\n\r", mail->data); break; @@ -274,10 +267,9 @@ decimalValue = (command[index] - '0')/10; } } - putMessage(MAX_SPEED_ECHO1, intValue); - putMessage(MAX_SPEED_ECHO2, (int) (100*decimalValue)); decimalValue = (decimalValue + intValue); //HERE SEND IT TO ANY GLOBAL VARIABLE YOU WISH + putMessage(MAX_SPEED_CMD,0, decimalValue); maxSpeed = decimalValue; break; @@ -310,7 +302,8 @@ commandDecoder(command); } else if (command[0] == 'V') { - putMessage(MAX_SPEED_CMD); + commandDecoder(command); + //putMessage(MAX_SPEED_CMD); } else if (command[0] == 'K') { if (index == 18){ // when index is 18 means you entered K and 16 digits