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.
HbMotor.cpp
- Committer:
- takeru0x1103
- Date:
- 2018-12-01
- Revision:
- 18:5aa48aec9cae
- Child:
- 19:4b0fe9a5ec38
File content as of revision 18:5aa48aec9cae:
#include "HbMotor.h" #include "fpga.h" //========================================= //コンストラクタ //========================================= HbMotor::HbMotor(UCHAR iID ){ id =iID; ofs =100;// limitH =500; limitL =-500; } //----------------------------------------- //モーター設定 //----------------------------------------- void HbMotor::setValue(INT16 iVal){ UINT16 val; UINT16 slt; //入力リミット if( iVal > limitH ){ val = limitH; }else if( iVal < limitL ){ val = limitL; }else{ val = iVal; } //オフセット重畳 val = val + ofs; fpgaSubProp(id,val); }