CANTalon throttle works.

Fleshed out CANTalon interface; it currently works just to write a
throttle. The firmware doesn't fully support everything yet, so we are
still significantly limited.

Change-Id: I2868c4c168a8cb42cda754589777beef31ffd354
This commit is contained in:
James Kuszmaul
2014-11-14 15:18:40 -05:00
parent 9050ea7e3d
commit 9be6ee4712
6 changed files with 150 additions and 35 deletions

View File

@@ -9,10 +9,13 @@
#include "TestBench.h"
TEST(CANTalonTest, QuickTest) {
CANTalon talon(10);
CANTalon talon(0);
talon.SetControlMode(CANTalon::kPercentVbus);
talon.EnableControl();
talon.Set(1.0);
Wait(0.25);
EXPECT_GT(talon.GetOutputCurrent(), 4.0);
for(;;) {
std::cout << "Firmware version: " << talon.GetFirmwareVersion() << std::endl;
Wait(0.25);
}
talon.Set(0.0);
talon.Disable();
}