mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user