本文整理汇总了C++中CANJaguar::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ CANJaguar::Get方法的具体用法?C++ CANJaguar::Get怎么用?C++ CANJaguar::Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CANJaguar
的用法示例。
在下文中一共展示了CANJaguar::Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TeleopPeriodic
void TeleopPeriodic()
{
SmartDashboard::PutNumber("joystickX",stick.GetX());
SmartDashboard::PutNumber("joystickY",stick.GetY());
//SmartDashboard::PutBoolean("fucking buttons", stick.GetRawButton(1));
//SmartDashboard::PutNumber("potentiometer voltage", pot.GetVoltage());
SmartDashboard::PutBoolean("infra",infra.Get());
SmartDashboard::PutNumber("accelX",accel.GetX());
SmartDashboard::PutNumber("accelY",accel.GetY());
SmartDashboard::PutNumber("accelZ",accel.GetZ());
servo.Set(
trueMap(stick.GetX(), 1, -1, 1, 0) // trueMap allows use of entire joystick
);
SmartDashboard::PutNumber("servo", servo.Get());
jag1.Set(stick.GetY());
jag2.Set(stick.GetY());
//tal1.Set(stick.GetY());
SmartDashboard::PutNumber("jag1", jag1.Get());
SmartDashboard::PutNumber("jag2", jag2.Get());
/*SmartDashboard::PutNumber("encpos", enc.Get());
SmartDashboard::PutNumber("encspd", enc.GetRate());*/
if (stick.GetRawButton(1) && !actuatePressed) {
pistonVal=!pistonVal;
piston.Set(pistonVal ? DoubleSolenoid::kForward : DoubleSolenoid::kReverse);
actuatePressed = true;
}
else if (!stick.GetRawButton(1))
actuatePressed = false;
SmartDashboard::PutBoolean("piston forward", piston.Get() == DoubleSolenoid::kForward);
}
示例2: UpdateDashboardStatus
void UpdateDashboardStatus()
{
Dashboard &dashHigh = m_ds->GetHighPriorityDashboardPacker();
dashHigh.AddCluster(); // PID (not used for now)
dashHigh.AddDouble(0.0); // P
dashHigh.AddDouble(0.0); // I
dashHigh.AddDouble(0.0); // D
dashHigh.FinalizeCluster();
dashHigh.AddDouble(speedJag.GetSpeed()); // Current position
dashHigh.AddDouble(speedJag.Get()); // Setpoint
dashHigh.AddDouble(speedJag.GetOutputVoltage()); // Output Voltage
dashHigh.Finalize();
}