mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Adds CANTalon to LiveWindow
CANTalon was not being added to the LiveWindow list. Change-Id: I732bb65a899f11bb9b1ef0a7320f0f0cc78233f7
This commit is contained in:
committed by
Peter Johnson
parent
5976baec02
commit
99b2b65148
@@ -8,6 +8,8 @@
|
||||
#include "WPIErrors.h"
|
||||
#include <unistd.h> // usleep
|
||||
#include <sstream>
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
|
||||
/**
|
||||
* Number of adc engineering units per 0 to 3.3V sweep.
|
||||
* This is necessary for scaling Analog Position in rotations/RPM.
|
||||
@@ -35,6 +37,7 @@ CANTalon::CANTalon(int deviceNumber)
|
||||
ApplyControlMode(m_controlMode);
|
||||
m_impl->SetProfileSlotSelect(m_profile);
|
||||
m_isInverted = false;
|
||||
LiveWindow::GetInstance()->AddActuator("CANTalon", m_deviceNumber, this);
|
||||
}
|
||||
/**
|
||||
* Constructor for the CANTalon device.
|
||||
@@ -48,6 +51,7 @@ CANTalon::CANTalon(int deviceNumber, int controlPeriodMs)
|
||||
m_safetyHelper(new MotorSafetyHelper(this)) {
|
||||
ApplyControlMode(m_controlMode);
|
||||
m_impl->SetProfileSlotSelect(m_profile);
|
||||
LiveWindow::GetInstance()->AddActuator("CANTalon", m_deviceNumber, this);
|
||||
}
|
||||
|
||||
CANTalon::~CANTalon() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import edu.wpi.first.wpilibj.communication.UsageReporting;
|
||||
import edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary.tResourceType;
|
||||
import edu.wpi.first.wpilibj.tables.ITable;
|
||||
import edu.wpi.first.wpilibj.tables.ITableListener;
|
||||
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
|
||||
public class CANTalon implements MotorSafety, PIDOutput, PIDSource, CANSpeedController {
|
||||
private MotorSafetyHelper m_safetyHelper;
|
||||
@@ -316,6 +317,7 @@ public class CANTalon implements MotorSafety, PIDOutput, PIDSource, CANSpeedCont
|
||||
m_feedbackDevice = FeedbackDevice.QuadEncoder;
|
||||
setProfile(m_profile);
|
||||
applyControlMode(TalonControlMode.PercentVbus);
|
||||
LiveWindow.addActuator("CANTalon", m_deviceNumber, this);
|
||||
}
|
||||
/**
|
||||
* Constructor for the CANTalon device.
|
||||
@@ -336,6 +338,7 @@ public class CANTalon implements MotorSafety, PIDOutput, PIDSource, CANSpeedCont
|
||||
m_feedbackDevice = FeedbackDevice.QuadEncoder;
|
||||
setProfile(m_profile);
|
||||
applyControlMode(TalonControlMode.PercentVbus);
|
||||
LiveWindow.addActuator("CANTalon", m_deviceNumber, this);
|
||||
}
|
||||
/**
|
||||
* Constructor for the CANTalon device.
|
||||
@@ -359,6 +362,7 @@ public class CANTalon implements MotorSafety, PIDOutput, PIDSource, CANSpeedCont
|
||||
m_feedbackDevice = FeedbackDevice.QuadEncoder;
|
||||
setProfile(m_profile);
|
||||
applyControlMode(TalonControlMode.PercentVbus);
|
||||
LiveWindow.addActuator("CANTalon", m_deviceNumber, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user