Feng Hong / Mbed OS Nucleo_rtos_basic
Revision:
21:5c6b3657c3cb
Parent:
20:ec9d4f6a16ac
--- a/payload.cpp	Sat Oct 19 02:10:12 2019 +0000
+++ b/payload.cpp	Sat Feb 22 04:53:57 2020 +0000
@@ -270,7 +270,7 @@
 {   
     int can_id;
     int init_weight;
-    int needed_weight;
+    int weight;
     int loop;
     switch (data_pack.cmd)
     {
@@ -287,9 +287,9 @@
                 break;
             case COMMAND_PLUS:
                 init_weight = current_weight;
-                needed_weight = data_pack.value1;
-                printf("init_weight:%dg needed_weight:%dg\r\n", init_weight, needed_weight);
-                while ((current_weight - init_weight) <= needed_weight)
+                weight = data_pack.value1;
+                printf("init_weight:%dg needed_weight:%dg\r\n", init_weight, weight);
+                while ((current_weight - init_weight) <= weight)
                 {
                     printf("still need to plus weight %dg \r\n", (current_weight - init_weight));
                 }