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: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
pidBearing.h
00001 #ifndef pidBearing_H 00002 #define pidBearing_H 00003 00004 #include "generalFunctions.h" 00005 #include "mbed.h" 00006 #include "orion_pinmapping.h" 00007 #include "config.h" 00008 #include "math.h" 00009 00010 class pidBearing 00011 { 00012 public: 00013 //motorDriver(PinName mPlus, PinName mMinus, int freq_khz); 00014 //void setPWM(float val); 00015 00016 pidBearing(); 00017 void setSpeedChange(float* wl, float* wr, float* speedChange, float* Error, 00018 float target[2], 00019 float local[2], 00020 float yaw, 00021 float* robotFrame, 00022 float xx, float yy, 00023 float* k3, 00024 float lGain); 00025 void pidBearing::findRobotFrameDistance(float target[2], float local[2], float* robotFrame); 00026 00027 private: 00028 float kp, kd, ki; 00029 float imuToAchieve, offset, angleToRotate, prevaError, bearingToWaypoint, sumError, max_in, minDist; 00030 }; 00031 00032 00033 #endif
Generated on Tue Jul 12 2022 20:53:07 by
1.7.2
