mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Generalize CANJaguar and CANTalon with a CANSpeedController interface in C++
CANSpeedController is a subinterface of SpeedController that adds method prototypes and enums for all of the common smart speed controller features. CANJaguar implements this interfaces. CANTalon does too, but most methods are stubs right now. Change-Id: I67e0177d91e45444657280502a247d787ad5c74c
This commit is contained in:
committed by
James Kuszmaul
parent
c1f68eb2b0
commit
9050ea7e3d
18
wpilibc/wpilibC++IntegrationTests/src/CANTalonTest.cpp
Normal file
18
wpilibc/wpilibC++IntegrationTests/src/CANTalonTest.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2014. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "WPILib.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "TestBench.h"
|
||||
|
||||
TEST(CANTalonTest, QuickTest) {
|
||||
CANTalon talon(10);
|
||||
|
||||
for(;;) {
|
||||
std::cout << "Firmware version: " << talon.GetFirmwareVersion() << std::endl;
|
||||
Wait(0.25);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user