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


C++ Encoder::SetMinRate方法代码示例

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


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

示例1: RobotInit

  void RobotInit ()
  {
  lw = LiveWindow::GetInstance();
  CameraServer::GetInstance()->SetQuality(50);
   //the camera name (ex "cam0") can be found through the roborio web interface
  CameraServer::GetInstance()->StartAutomaticCapture("cam1");
  AutonState = 0;
  ballarm.Reset();
  ballarm.SetMaxPeriod(.01);
  ballarm.SetMinRate(.02);
  ballarm.SetDistancePerPulse(.9);
  gyroOne.Calibrate();
  UpdateActuatorCmnds(0,0,false,false,false,false,false,false,false,0,0,0,0,0);

  UpdateSmartDashboad(false,
                      false,
                      false,
                      false,
                      false,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0);
  }
开发者ID:ConnerWallace,项目名称:5561-Raider-Robotics,代码行数:29,代码来源:Robot.cpp

示例2: TeleopInit

	void TeleopInit()
	{
// Initialize the encoder
		sampleEncoder = new Encoder(0, 1, false, Encoder::EncodingType::k4X);
		sampleEncoder->SetMaxPeriod(.1);
		sampleEncoder->SetMinRate(10);
		sampleEncoder->SetDistancePerPulse(5);
		sampleEncoder->SetReverseDirection(true);
		sampleEncoder->SetSamplesToAverage(7);

// Initialize the joystick
		joystick = new Joystick(0);

// Initialize the motor
		motor = new Victor(9);

// Initialize the gear tooth counter
		toothTrigger = new AnalogTrigger(3);
		toothTrigger->SetLimitsRaw(250, 3600);
		gearToothCounter = new Counter(toothTrigger);
//		gearToothCounter->SetUpDownCounterMode();
	}
开发者ID:prajwal1121,项目名称:2015,代码行数:22,代码来源:Robot.cpp

示例3: SetMinEncoderRate

/**
 * Set the minimum rate of the device before the hardware reports it stopped.
 * 
 * @param minRate The minimum rate.  The units are in distance per second as scaled by the value from SetEncoderDistancePerPulse().
 *
 * @param aSlot The digital module slot for the A Channel on the encoder
 * @param aChannel The channel on the digital module for the A Channel of the encoder
 * @param bSlot The digital module slot for the B Channel on the encoder
 * @param bChannel The channel on the digital module for the B Channel of the encoder
 */
void SetMinEncoderRate(UINT32 aSlot, UINT32 aChannel, UINT32 bSlot, UINT32 bChannel, double minRate)
{
	Encoder *encoder = AllocateEncoder(aSlot, aChannel, bSlot, bChannel);
	if (encoder != NULL)
		encoder->SetMinRate(minRate);
}
开发者ID:Techbrick,项目名称:MainWorkingCode,代码行数:16,代码来源:CEncoder.cpp


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