mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpiutil] Add serializable marker interfaces (#6060)
This commit is contained in:
@@ -6,12 +6,15 @@ package edu.wpi.first.math.controller;
|
||||
|
||||
import edu.wpi.first.math.controller.proto.ArmFeedforwardProto;
|
||||
import edu.wpi.first.math.controller.struct.ArmFeedforwardStruct;
|
||||
import edu.wpi.first.util.protobuf.ProtobufSerializable;
|
||||
import edu.wpi.first.util.struct.StructSerializable;
|
||||
|
||||
/**
|
||||
* A helper class that computes feedforward outputs for a simple arm (modeled as a motor acting
|
||||
* against the force of gravity on a beam suspended at an angle).
|
||||
*/
|
||||
public class ArmFeedforward {
|
||||
public class ArmFeedforward
|
||||
implements ProtobufSerializable<ArmFeedforward>, StructSerializable<ArmFeedforward> {
|
||||
public final double ks;
|
||||
public final double kg;
|
||||
public final double kv;
|
||||
|
||||
@@ -6,9 +6,13 @@ package edu.wpi.first.math.controller;
|
||||
|
||||
import edu.wpi.first.math.controller.proto.DifferentialDriveWheelVoltagesProto;
|
||||
import edu.wpi.first.math.controller.struct.DifferentialDriveWheelVoltagesStruct;
|
||||
import edu.wpi.first.util.protobuf.ProtobufSerializable;
|
||||
import edu.wpi.first.util.struct.StructSerializable;
|
||||
|
||||
/** Motor voltages for a differential drive. */
|
||||
public class DifferentialDriveWheelVoltages {
|
||||
public class DifferentialDriveWheelVoltages
|
||||
implements ProtobufSerializable<DifferentialDriveWheelVoltages>,
|
||||
StructSerializable<DifferentialDriveWheelVoltages> {
|
||||
public double left;
|
||||
public double right;
|
||||
|
||||
|
||||
@@ -9,12 +9,15 @@ import edu.wpi.first.math.Nat;
|
||||
import edu.wpi.first.math.controller.proto.ElevatorFeedforwardProto;
|
||||
import edu.wpi.first.math.controller.struct.ElevatorFeedforwardStruct;
|
||||
import edu.wpi.first.math.system.plant.LinearSystemId;
|
||||
import edu.wpi.first.util.protobuf.ProtobufSerializable;
|
||||
import edu.wpi.first.util.struct.StructSerializable;
|
||||
|
||||
/**
|
||||
* A helper class that computes feedforward outputs for a simple elevator (modeled as a motor acting
|
||||
* against the force of gravity).
|
||||
*/
|
||||
public class ElevatorFeedforward {
|
||||
public class ElevatorFeedforward
|
||||
implements ProtobufSerializable<ElevatorFeedforward>, StructSerializable<ElevatorFeedforward> {
|
||||
public final double ks;
|
||||
public final double kg;
|
||||
public final double kv;
|
||||
|
||||
Reference in New Issue
Block a user