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: SBDBT arrc_mbed BNO055
AutoMatic.cpp
- Committer:
- kazumayamanaka
- Date:
- 2022-01-28
- Revision:
- 5:e189d55ef292
File content as of revision 5:e189d55ef292:
#include "AutoMatic.hpp"
double AutoMatic::CalcDiffX(){ return TargetPosX - PosX; }
void AutoMatic::pass_TargetPosX(double X){
TargetPosX = X;
}
void AutoMatic::pass_PosX(double X){
PosX = X;
}
void AutoMatic::CalcPowerX(){
if(CalcDiffX()>0){
Xpower = 100;
}
else{
Xpower = 0;
}
}
double AutoMatic::obt_Xpower(){
CalcPowerX();
return Xpower;
}