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 BufferedSerial ConfigFile
Diff: ROBOFRIEN_SUB_FUNC/ROBOFRIE_PID.cpp
- Revision:
- 1:9530746906b6
- Parent:
- 0:3473b92e991e
--- a/ROBOFRIEN_SUB_FUNC/ROBOFRIE_PID.cpp Tue Jun 12 01:05:50 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-#include "ROBOFRIEN_PID.h"
-#include "PID.h"
-
-#define RATE 0.01
-PID ROLL_RATE_PID(10.0, 0.0, 0.0, RATE);
-
-void ROBOFRIEN_PID::Init(){
- ROLL_RATE_PID.setInputLimits(0.0, 10.0);
- ROLL_RATE_PID.setOutputLimits(0.0, 1.0);
- ROLL_RATE_PID.setMode(AUTO_MODE);
- ROLL_RATE_PID.setSetPoint(err_Angle[0]);
-}
-
-void ROBOFRIEN_PID::ROLL_RATE_PID_RUN(){
- if(err_Rate[0] >= 0){
- ROLL_RATE_PID.setProcessValue(err_Rate[0]);
- output_Data[0] = ROLL_RATE_PID.compute();
- }
- else{
- ROLL_RATE_PID.setProcessValue(-err_Rate[0]);
- output_Data[0] = -ROLL_RATE_PID.compute();
- }
-}
-
-void ROBOFRIEN_PID::update(){
- ROLL_RATE_PID_RUN();
-}
-
-