Revision 3:56ad82f5f780, committed 2015-11-13
- Comitter:
- inst
- Date:
- Fri Nov 13 08:15:43 2015 +0000
- Parent:
- 2:58d7debaed1f
- Commit message:
Changed in this revision
Command.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 58d7debaed1f -r 56ad82f5f780 Command.cpp --- a/Command.cpp Wed Oct 14 05:50:26 2015 +0000 +++ b/Command.cpp Fri Nov 13 08:15:43 2015 +0000 @@ -5,31 +5,14 @@ #include "XBee.h" // angle to analog -/* -const float Command::mAngleToAnalogCoeffA = -0.01584967; -const float Command::mAngleToAnalogCoeffB = 0.788235; -*/ const float Command::mAngleToAnalogCoeffA = -0.016122; const float Command::mAngleToAnalogCoeffB = 0.800000; const float Command::mShootingAngleTable[] = { - //4.0f, // OWN_POLE - //16.0f, // OWN_POLE - 22.0f - 6.0f, - //16.0f, - - //30.0f, // CENTER_MIDDLE_POLE - 36.0f - 6.0f, - //24.0f, // CENTER_MIDDLE_POLE - - //36.0f, // CENTER_SIDE_POLE - 30.0f - 6.0f, - //46.0f, - - //10.0f // ENEMYS_POLE - //10.0f - 6.0f, - 16.0f - 6.0f, - //24.0f + 22.0f - 6.0f, // OWN_POLE + 36.0f - 6.0f, // CENTER_MIDDLE_POLE + 30.0f - 6.0f, // CENTER_SIDE_POLE + 16.0f - 6.0f // ENEMYS_POLE }; const float Command::mMaxAngle_deg = 46.0f; const float Command::mMinAngle_deg = 2.0f; @@ -72,7 +55,6 @@ case ShootingSystem::AIM_OWN_POLE: mShootingAngle_deg = mShootingAngleTable[ OWN_POLE_ID ] + mAngleAdjust_deg; mShootVoltage = Shooter::WORKING_8V; - //mShooterPosition = 1.0f; mShooterPosition = 0.780392f; break; @@ -84,16 +66,13 @@ case ShootingSystem::AIM_CENTER_SIDE_POLE: mShootingAngle_deg = mShootingAngleTable[ CENTER_SIDE_POLE_ID ] + mAngleAdjust_deg; - //mShootVoltage = Shooter::WORKING_12V; mShootVoltage = Shooter::WORKING_12V; - //mShooterPosition = 1.0f; mShooterPosition = 0.780392f; break; case ShootingSystem::AIM_ENEMYS_POLE: mShootingAngle_deg = mShootingAngleTable[ ENEMYS_POLE_ID ] + mAngleAdjust_deg; mShootVoltage = Shooter::WORKING_12V; - //mShooterPosition = 0.0f; mShooterPosition = 0.305882f; break;