Diff: Robot.cpp
- Revision:
- 2:0d9bb8e1876b
- Parent:
- 1:48028dcad4e2
- Child:
- 3:4dbbd511a49d
diff -r 48028dcad4e2 -r 0d9bb8e1876b Robot.cpp --- a/Robot.cpp Fri Aug 21 04:51:19 2015 +0000 +++ b/Robot.cpp Wed Oct 14 03:50:52 2015 +0000 @@ -2,10 +2,17 @@ #include "Robot.h" #include "I2CDevice.h" -// Steering : I2CMotor * 4, I2CServo * 4 ---- 8 -// ShootingSystem : I2CServo * 2 ---- 2 -// XBee : XBee * 1 ---- 1 -// Shooter: Shooter * 1 ---- 1 +// XBee : ---- 1 +// Steering { +// I2CMotor * 3, I2CServo * 3 ---- 6 +// ShootingSystem : +// I2CServo * 1 ---- 1 +// } +// ShootingSystem { +// Shooter: ---- 1 +// AmmoPusher: ---- 1 +// AmmoSupplier: ---- 1 +// } const int Robot::mNumOfI2CDevice = 12; void Robot::update(){ @@ -16,12 +23,12 @@ void Robot::writeI2CDevice(){ for ( int i = 0; i < mNumOfI2CDevice; ++i ){ - mI2CDevice[ i ]->write(); + mI2CDevice[ i ]->writeI2C(); } } void Robot::readI2CDevice(){ for ( int i = 0; i < mNumOfI2CDevice; ++i ){ - mI2CDevice[ i ]->read(); + mI2CDevice[ i ]->readI2C(); } }