Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: payload.cpp
- 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)); }