1 #include "ETBalanceRunner.h"
\r
3 #include "GyroSensor.h"
\r
7 #include "balancer.h"
\r
12 ETBalanceRunner::ETBalanceRunner(Motor& motorL, Motor& motorR, GyroSensor& gyro, Nxt& nxt)
\r
13 : m_motorL(motorL), m_motorR(motorR), m_gyro(gyro), m_nxt(nxt), m_gyrooffset(610)
\r
17 ETBalanceRunner::~ETBalanceRunner(void)
\r
20 void ETBalanceRunner::Run(int forward, int turn)
\r
23 balance_control(forward,0,m_gyro.get(),m_gyrooffset,m_motorL.getCount(),m_motorR.getCount(),m_nxt.getBattMv(),&l,&r);
\r
30 l = l + (r - (-100));
\r
36 bool ETBalanceRunner::IsException() const
\r
40 void ETBalanceRunner::Stop()
\r
45 void ETBalanceRunner::Reset()
\r
49 void ETBalanceRunner::SetGyroOffset(int offset)
\r
51 m_gyrooffset = offset;
\r