mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fix GearsBot log methods not being called periodically (#2280)
Add logging for C++ Wrist and Claw
This commit is contained in:
committed by
Peter Johnson
parent
2eb5c54476
commit
ac8177e10d
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2019-2020 FIRST. 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 the root directory of */
|
||||
/* the project. */
|
||||
@@ -76,12 +76,6 @@ public class RobotContainer {
|
||||
SmartDashboard.putData(m_wrist);
|
||||
SmartDashboard.putData(m_claw);
|
||||
|
||||
// Call log method on all subsystems
|
||||
m_wrist.log();
|
||||
m_elevator.log();
|
||||
m_drivetrain.log();
|
||||
m_claw.log();
|
||||
|
||||
// Configure the button bindings
|
||||
configureButtonBindings();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. 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 the root directory of */
|
||||
/* the project. */
|
||||
@@ -60,4 +60,12 @@ public class Claw extends SubsystemBase {
|
||||
public boolean isGrabbing() {
|
||||
return m_contact.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Call log method every loop.
|
||||
*/
|
||||
@Override
|
||||
public void periodic() {
|
||||
log();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2019-2020 FIRST. 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 the root directory of */
|
||||
/* the project. */
|
||||
@@ -121,4 +121,12 @@ public class DriveTrain extends SubsystemBase {
|
||||
// Really meters in simulation since it's a rangefinder...
|
||||
return m_rangefinder.getAverageVoltage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Call log method every loop.
|
||||
*/
|
||||
@Override
|
||||
public void periodic() {
|
||||
log();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. 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 the root directory of */
|
||||
/* the project. */
|
||||
@@ -75,4 +75,12 @@ public class Elevator extends PIDSubsystem {
|
||||
public void useOutput(double output, double setpoint) {
|
||||
m_motor.set(output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call log method every loop.
|
||||
*/
|
||||
@Override
|
||||
public void periodic() {
|
||||
log();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2017-2020 FIRST. 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 the root directory of */
|
||||
/* the project. */
|
||||
@@ -72,4 +72,12 @@ public class Wrist extends PIDSubsystem {
|
||||
public void useOutput(double output, double setpoint) {
|
||||
m_motor.set(output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call log method every loop.
|
||||
*/
|
||||
@Override
|
||||
public void periodic() {
|
||||
log();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user