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: HbMotor.cpp
- Revision:
- 24:c5945aaae777
- Parent:
- 19:4b0fe9a5ec38
- Child:
- 25:f3a6e7eec9c3
--- a/HbMotor.cpp Sat Dec 08 12:08:25 2018 +0000 +++ b/HbMotor.cpp Mon Dec 10 12:29:37 2018 +0000 @@ -7,8 +7,8 @@ HbMotor::HbMotor(UCHAR iID ){ id =iID; ofs =0;// - limitH =500; - limitL =-500; + limitH =800; + limitL =-800; } //----------------------------------------- @@ -32,3 +32,11 @@ //PWM幅設定 fpgaSubProp(id,val); } +void HbMotor::setOffset(INT16 iVal){ + ofs = iVal; +} + +void HbMotor::setLimit(INT16 low, INT16 hi){ + limitL = low; + limitH = hi; +} \ No newline at end of file