本文整理汇总了C++中AnalogGyro::InitGyro方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalogGyro::InitGyro方法的具体用法?C++ AnalogGyro::InitGyro怎么用?C++ AnalogGyro::InitGyro使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnalogGyro
的用法示例。
在下文中一共展示了AnalogGyro::InitGyro方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// The initializer of dooooooom!!!!!
Robot() :
myRobot(0, 1), // these must be initialized in the same order
rStick(RIGHT_JOYSTICK_INPUT_CHANNEL), // as they are declared above.
lStick(LEFT_JOYSTICK_INPUT_CHANNEL),
gamePad(GAMEPAD_INPUT_CHANNEL),
lw(LiveWindow::GetInstance()),
autoLoopCounter(0),
gyro(GYRO_INPUT_CHANNEL),
encoder1(ENCODER_CHANNEL_1A, ENCODER_CHANNEL_1B),
encoder2(ENCODER_CHANNEL_2A, ENCODER_CHANNEL_2B),
lifterEncoder(LIFTER_ENCODER_CHANNEL_1, LIFTER_ENCODER_CHANNEL_2),
ballManipulatorEncoder(B_MANIPULATOR_ENCODER_CHANNEL_1, B_MANIPULATOR_ENCODER_CHANNEL_2),
lifter(LIFTER_CHANNEL_LIFT, LIFTER_CHANNEL_TILT, lifterEncoder),
ballManipulator(B_MANIPULATOR_CHANNEL_LIFT, B_MANIPULATOR_CHANNEL_PINCH, ballManipulatorEncoder)
{
myRobot.SetExpiration(0.1);
driveOption = TANK_GAMEPAD;
gyro.InitGyro();
showGyro = true;
showEncoderRaw = true;
showEncoderRate = false;
showEncoderIndex = false;
autoTurn = 0;
}
示例2:
// The initializer of dooooooom!!!!!
Robot() :
myRobot(0, 1), // these must be initialized in the same order
rStick(RIGHT_JOYSTICK_INPUT_CHANNEL), // as they are declared above.
lStick(LEFT_JOYSTICK_INPUT_CHANNEL),
gamePad(GAMEPAD_INPUT_CHANNEL),
lw(LiveWindow::GetInstance()),
autoLoopCounter(0),
gyro(GYRO_INPUT_CHANNEL),
encoder1(ENCODER_CHANNEL_1A, ENCODER_CHANNEL_1B),
encoder2(ENCODER_CHANNEL_2A, ENCODER_CHANNEL_2B)
{
myRobot.SetExpiration(0.1);
driveOption = ARCADE_GAMEPAD_2;
gyro.InitGyro();
showGyro = true;
showEncoderRaw = true;
showEncoderRate = true;
showEncoderIndex = false;
}