This is probably never gonna get done

Dependencies:   Crypto

Files at this revision

API Documentation at this revision

Comitter:
Olaffo
Date:
Wed Mar 20 16:50:01 2019 +0000
Parent:
21:34f440ae0227
Commit message:
accepting maxSpeed fixed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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