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


C++ Counter::Start方法代码示例

本文整理汇总了C++中Counter::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ Counter::Start方法的具体用法?C++ Counter::Start怎么用?C++ Counter::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Counter的用法示例。


在下文中一共展示了Counter::Start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Solenoid

	RobotDemo(void)		
	{
		kicker_in_motion = false;
		sol = new Solenoid(2);
		rightstick = new Joystick(1);
		leftstick = new Joystick(2);
		lonelystick = new Joystick (3);
		Motor1=new Jaguar(1);
		Motor2=new Jaguar(2);
		Motor3=new Jaguar(3);
		Motor4=new Jaguar(4);
		BallGathererMotor9 = new Jaguar(9);
		myRobot=new RobotDrive(Motor1,Motor2,Motor4,Motor3);
		rlyLED=new Relay(8,Relay::kForwardOnly);
		cam = &AxisCamera::GetInstance("10.8.12.11");
		cam->WriteResolution(AxisCameraParams::kResolution_160x120);
		myRobot->SetExpiration(0.5);
		ControllBox = & DriverStation::GetInstance()->GetEnhancedIO();
		shooter1 = new Jaguar(5); //front left
		shooter2 = new Jaguar(6);
		shooter3 = new Jaguar(7);
		shooter4 = new Jaguar(8);
		//shooterDin = new DigitalInput(1);
		shootercontador = new Counter(1);
		shootercontador->Start();
		shooterspeedTask = new Task("ShooterSpeed",(FUNCPTR)&shooterspeedloop);
		kickerTask = new Task ("Kicker", (FUNCPTR)&kickerloop);
		Upperlimit = new DigitalInput(3);
		Lowerlimit = new DigitalInput(2);
		kickermotor = new Relay (6, Relay::kBothDirections);
		BridgeBootMotor10 = new Jaguar(10);
		kicker_cancel = false;
		kicker_down = false;
		
	}
开发者ID:preuss812,项目名称:FRC_2012,代码行数:35,代码来源:MyRobot.cpp

示例2:

	RobotDemo(void):
		myRobot(1, 2),	// these must be initialized in the same order
		stick(1),
		in1(8), in2(7)
	{
		GetWatchdog().SetExpiration(0.1);
		
		// specify the source
		countXhi.SetUpSource(in1);
		countXlow.SetUpSource(in1);
		countYhi.SetUpSource(in2);
		countYlow.SetUpSource(in2);
		
		// setup the counters
		countXhi.SetSemiPeriodMode(true);
		countXlow.SetSemiPeriodMode(false);
		countYhi.SetSemiPeriodMode(true);
		countYlow.SetSemiPeriodMode(false);
		
		countXhi.Start();
		countXlow.Start();
		countYhi.Start();
		countYlow.Start();
	}
开发者ID:frc2423,项目名称:2008-2012,代码行数:24,代码来源:MyRobot.cpp

示例3: StartCounter

/**
 * Start the Counter counting.
 * This enables the counter and it starts accumulating counts from the associated
 * input channel. The counter value is not reset on starting, and still has the previous value.
 *
 * @param channel The channel of the digital input used with this counter
 */
void StartCounter(UINT32 channel)
{
    Counter *counter = AllocateCounter(channel);
    if (counter != NULL)
        counter->Start();
}
开发者ID:anidev,项目名称:frc-simulator,代码行数:13,代码来源:CCounter.cpp


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