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
16 ETBalanceRunner::~ETBalanceRunner(void)
\r
19 void ETBalanceRunner::Run(int forward, int turn)
\r
22 balance_control(forward,turn,m_gyro.getAnglerVelocity(),m_gyrooffset,m_motorL.getCount(),m_motorR.getCount(),m_nxt.getBattMv(),&l,&r);
\r
26 void ETBalanceRunner::SetGyroOffset(int offset)
\r
28 m_gyrooffset = offset;
\r