9/10
Diff: AMT21.cpp
- Revision:
- 1:3838b5e3966c
- Parent:
- 0:f3d3f744dbd9
- Child:
- 2:e0164b9fe93a
--- a/AMT21.cpp Thu Dec 10 06:41:13 2020 +0000 +++ b/AMT21.cpp Mon Apr 12 06:08:22 2021 +0000 @@ -76,7 +76,7 @@ return count_; } -double Amt21::getAngle() +double Amt21::getDeg() { getCount(); double angle_; @@ -84,6 +84,14 @@ angle_/=GEER_STEER; return angle_; } +double Amt21::getRad() +{ + getCount(); + double angle_; + angle_=(count_-COUNT_OFFSET)*2.0f*M_PI/RESOLUTION_AMT21; + angle_/=GEER_STEER; + return angle_; +} void Amt21::reset() { instruction=RESET;