当前位置: 首页>>代码示例>>C++>>正文


C++ AnalogGyro::InitGyro方法代码示例

本文整理汇总了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;
	}
开发者ID:CCathFIre,项目名称:Komodo-4293-2016-Code,代码行数:29,代码来源:Robot.cpp

示例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;
	}
开发者ID:CCathFIre,项目名称:Komodo-4293-2016-Code,代码行数:23,代码来源:Robot.cpp


注:本文中的AnalogGyro::InitGyro方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。