Dependencies: AmmoPusher AmmoSupplier Shooter
Revision 3:bf4ae302724c, committed 2015-10-15
- Comitter:
- inst
- Date:
- Thu Oct 15 08:45:53 2015 +0000
- Parent:
- 2:4972946a6dfc
- Commit message:
Changed in this revision
ShootingSystem.cpp | Show annotated file Show diff for this revision Revisions of this file |
ShootingSystem.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4972946a6dfc -r bf4ae302724c ShootingSystem.cpp --- a/ShootingSystem.cpp Wed Oct 14 06:02:19 2015 +0000 +++ b/ShootingSystem.cpp Thu Oct 15 08:45:53 2015 +0000 @@ -60,6 +60,14 @@ } } +ShootingSystem::~ShootingSystem(){ + delete mShooterAngleServo; + delete mAmmoPusher; + delete mAmmoSupplier; + delete mShooter; + delete mPositionManager; +} + void ShootingSystem::waiting( Command command ){ if ( command.isSupplying() ){ mAmmoSupplier->supply();
diff -r 4972946a6dfc -r bf4ae302724c ShootingSystem.h --- a/ShootingSystem.h Wed Oct 14 06:02:19 2015 +0000 +++ b/ShootingSystem.h Thu Oct 15 08:45:53 2015 +0000 @@ -34,6 +34,7 @@ ShootingSystem( I2CServo* angleManagerServo, AmmoPusher* ammoPusher, AmmoSupplier* ammoSupplier, Shooter* shooter, I2CServo* positoinManager ); + ~ShootingSystem(); void update( Command command ); @@ -46,11 +47,11 @@ static bool mIsShootable; - I2CServo* mShooterAngleServo; - AmmoPusher* mAmmoPusher; - AmmoSupplier* mAmmoSupplier; - Shooter* mShooter; - I2CServo* mPositionManager; + I2CServo* mShooterAngleServo; + AmmoPusher* mAmmoPusher; + AmmoSupplier* mAmmoSupplier; + Shooter* mShooter; + I2CServo* mPositionManager; State mState; Timer mTimer; };