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 AQM1602 HMC6352 PID
Diff: main_processing/strategy_parts/input.cpp
- Revision:
- 21:d69a8f3c76e1
- Parent:
- 19:342da3a5a474
- Child:
- 22:a95f7c63af3c
--- a/main_processing/strategy_parts/input.cpp Thu Jan 21 16:54:54 2016 +0000
+++ b/main_processing/strategy_parts/input.cpp Sat Jan 30 09:02:03 2016 +0000
@@ -4,7 +4,8 @@
void PidUpdate(void)
{
//pid.setSetPoint(REFERENCE + data.FrontDeg);
- data.InputPID = data.gyro;//0<data.gyro<3599
+ data.cmps = hmc.sample()/10.0;
+ data.InputPID = data.cmps;//0<data.gyro<3599
pid.setProcessValue(data.InputPID);
data.OutputPID = -pid.compute();
@@ -50,13 +51,8 @@
}
//line
-uint8_t ReadRawLine(void){//1or0
- data.rawLn = RawLineSignal;
- return (data.rawLn>0);
-}
-uint8_t ReadHeldLine(void){//1or0
- data.heldLn = HeldLineSignal;
- return (data.heldLn>0);
+uint8_t ReadLine(void){
+
}
//ball
uint8_t ReadBall(void){//1or0
@@ -75,6 +71,9 @@
void ReadGyro(void){
//Data can be got by interrupt.
}
+void ReadCmps(void){
+
+}
void ReadPing(void){
uint16_t spi_data;
spi_ss[1]=0;