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.
Dependencies: mbed
Diff: ForceRead.cpp
- Revision:
- 18:25281ee3a517
- Parent:
- 17:9a060d2daca8
- Child:
- 19:67584cb64b9c
--- a/ForceRead.cpp Thu Jul 04 07:59:14 2019 +0000 +++ b/ForceRead.cpp Thu Jul 04 08:08:18 2019 +0000 @@ -133,15 +133,13 @@ // bt.putc('\n'); // ======================================== BH 190704 added int force_R[4]; - force_R[0] = force_R1.read(); - force_R[1] = force_R2.read(); - force_R[2] = force_R3.read(); - force_R[3] = force_R4.read(); // 0 ~ 1 - for(int i=0; i<4 ; i++){ - force_R[i]*=100; //forcr_R range = 0~1 -> changed 0~99 - if(force_R[i] > 100) force_R[i] = 99; // for fixed space 2 - } - bt.printf("<FOT%d%d%d%d>\n", force_R[0], +// force_R[i]*=100; //forcr_R range = 0~1 -> changed 0~99 + force_R[0] = force_R1.read()*99; + force_R[1] = force_R2.read()*99; + force_R[2] = force_R3.read()*99; + force_R[3] = force_R4.read()*99; + + bt.printf("<FOT%2d%2d%2d%2d>\n", force_R[0], force_R[1], force_R[2], force_R[3]);