Merge branch 'main' into 2027

This commit is contained in:
Peter Johnson
2026-02-27 14:24:41 -08:00
13 changed files with 317 additions and 19 deletions

View File

@@ -43,10 +43,13 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
* @param gearbox The type of and number of motors in the arm gearbox.
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
* @param armLength The length of the arm in meters.
* @param minAngleRads The minimum angle that the arm is capable of.
* @param maxAngleRads The maximum angle that the arm is capable of.
* @param minAngleRads The minimum angle that the arm is capable of, with 0 radians being
* horizontal.
* @param maxAngleRads The maximum angle that the arm is capable of, with 0 radians being
* horizontal.
* @param simulateGravity Whether gravity should be simulated or not.
* @param startingAngleRads The initial position of the Arm simulation in radians.
* @param startingAngleRads The initial position of the Arm simulation in radians, with 0 radians
* being horizontal.
* @param measurementStdDevs The standard deviations of the measurements. Can be omitted if no
* noise is desired. If present must have 1 element for position.
*/
@@ -79,10 +82,13 @@ public class SingleJointedArmSim extends LinearSystemSim<N2, N1, N2> {
* @param gearing The gearing of the arm (numbers greater than 1 represent reductions).
* @param j The moment of inertia of the arm in kg-m²; can be calculated from CAD software.
* @param armLength The length of the arm in meters.
* @param minAngleRads The minimum angle that the arm is capable of.
* @param maxAngleRads The maximum angle that the arm is capable of.
* @param minAngleRads The minimum angle that the arm is capable of, with 0 radians being
* horizontal.
* @param maxAngleRads The maximum angle that the arm is capable of, with 0 radians being
* horizontal.
* @param simulateGravity Whether gravity should be simulated or not.
* @param startingAngleRads The initial position of the Arm simulation in radians.
* @param startingAngleRads The initial position of the Arm simulation in radians, with 0 radians
* being horizontal.
* @param measurementStdDevs The standard deviations of the measurements. Can be omitted if no
* noise is desired. If present must have 1 element for position.
*/

View File

@@ -82,6 +82,8 @@ public final class Preferences {
if (m_listener != null) {
m_listener.close();
}
Topic typePublisherTopic = m_typePublisher.getTopic();
m_listener =
NetworkTableListener.createListener(
m_tableSubscriber,
@@ -89,8 +91,8 @@ public final class Preferences {
event -> {
if (event.topicInfo != null) {
Topic topic = event.topicInfo.getTopic();
if (!topic.equals(m_typePublisher.getTopic())) {
event.topicInfo.getTopic().setPersistent(true);
if (!topic.equals(typePublisherTopic)) {
topic.setPersistent(true);
}
}
});