natsu tsumagari
/
test_cadenceClass
回転数計のクラスです。
Diff: Cadence.h
- Revision:
- 5:871c2d6c1129
- Parent:
- 4:2def7f5f7fed
- Child:
- 6:93f90c5d0e5b
--- a/Cadence.h Fri Jan 27 14:10:44 2017 +0000 +++ b/Cadence.h Sat Jan 28 01:07:59 2017 +0000 @@ -44,10 +44,10 @@ pc.putc(strC[i]); strV[i] = data[data_count - 43 + i]; // 44 = 42 + 1 } - sscanf(strC,"%4d",&cadence); - sscanf(strV,"%4d",&voltage); -// cadence /= 6.0; -// voltage /= 1000.0; + sscanf(strC,"%4d",&cadence_i); + sscanf(strV,"%4d",&voltage_i); + cadence = cadence_i/6.0; + voltage = voltage_i/1000.0; } } }