mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilib] Don't print PD errors for LiveWindow reads (#3708)
If something happens with the PD connection, these would have spammed messages continuously. This wasn't the case previously, and we don't want this behavior now.
This commit is contained in:
@@ -160,11 +160,16 @@ public class PowerDistribution implements Sendable, AutoCloseable {
|
||||
int numChannels = getNumChannels();
|
||||
for (int i = 0; i < numChannels; ++i) {
|
||||
final int chan = i;
|
||||
builder.addDoubleProperty("Chan" + i, () -> getCurrent(chan), null);
|
||||
builder.addDoubleProperty(
|
||||
"Chan" + i, () -> PowerDistributionJNI.getChannelCurrentNoError(m_handle, chan), null);
|
||||
}
|
||||
builder.addDoubleProperty("Voltage", this::getVoltage, null);
|
||||
builder.addDoubleProperty("TotalCurrent", this::getTotalCurrent, null);
|
||||
builder.addDoubleProperty(
|
||||
"Voltage", () -> PowerDistributionJNI.getVoltageNoError(m_handle), null);
|
||||
builder.addDoubleProperty(
|
||||
"TotalCurrent", () -> PowerDistributionJNI.getTotalCurrent(m_handle), null);
|
||||
builder.addBooleanProperty(
|
||||
"SwitchableChannel", this::getSwitchableChannel, this::setSwitchableChannel);
|
||||
"SwitchableChannel",
|
||||
() -> PowerDistributionJNI.getSwitchableChannelNoError(m_handle),
|
||||
value -> PowerDistributionJNI.setSwitchableChannel(m_handle, value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user