Class CANdiConfiguration
- All Implemented Interfaces:
ParentConfiguration, Cloneable
CANdi.-
Field Summary
FieldsModifier and TypeFieldDescriptionCustom Params.Configs related to the CANdi™ branded device's digital I/O settingsbooleanTrue if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.Configs related to the CANdi™ branded device's PWM interface on the Signal 1 input (S1IN)Configs related to the CANdi™ branded device's PWM interface on the Signal 2 input (S2IN)Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration.final StringGet the serialized form of this configuration.toString()final CANdiConfigurationwithCustomParams(CustomParamsConfigs newCustomParams) Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.final CANdiConfigurationwithDigitalInputs(DigitalInputsConfigs newDigitalInputs) Modifies this configuration's DigitalInputs parameter and returns itself for method-chaining and easier to use config API.final CANdiConfigurationwithPWM1(PWM1Configs newPWM1) Modifies this configuration's PWM1 parameter and returns itself for method-chaining and easier to use config API.final CANdiConfigurationwithPWM2(PWM2Configs newPWM2) Modifies this configuration's PWM2 parameter and returns itself for method-chaining and easier to use config API.final CANdiConfigurationwithQuadrature(QuadratureConfigs newQuadrature) Modifies this configuration's Quadrature parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
FutureProofConfigs
public boolean FutureProofConfigsTrue if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.
This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
-
CustomParams
Custom Params.Custom paramaters that have no real impact on controller.
Parameter list:
-
DigitalInputs
Configs related to the CANdi™ branded device's digital I/O settingsContains float-state settings and when to assert the S1/S2 inputs.
Parameter list:
-
Quadrature
Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputsAll the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction.
Parameter list:
-
PWM1
Configs related to the CANdi™ branded device's PWM interface on the Signal 1 input (S1IN)All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction.
Parameter list:
-
PWM2
Configs related to the CANdi™ branded device's PWM interface on the Signal 2 input (S2IN)All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction.
Parameter list:
-
-
Constructor Details
-
CANdiConfiguration
public CANdiConfiguration()
-
-
Method Details
-
withCustomParams
Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.Custom Params.
Custom paramaters that have no real impact on controller.
Parameter list:
- Parameters:
newCustomParams- Parameter to modify- Returns:
- Itself
-
withDigitalInputs
Modifies this configuration's DigitalInputs parameter and returns itself for method-chaining and easier to use config API.Configs related to the CANdi™ branded device's digital I/O settings
Contains float-state settings and when to assert the S1/S2 inputs.
Parameter list:
- Parameters:
newDigitalInputs- Parameter to modify- Returns:
- Itself
-
withQuadrature
Modifies this configuration's Quadrature parameter and returns itself for method-chaining and easier to use config API.Configs related to the CANdi™ branded device's quadrature interface using both the S1IN and S2IN inputs
All the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction.
Parameter list:
- Parameters:
newQuadrature- Parameter to modify- Returns:
- Itself
-
withPWM1
Modifies this configuration's PWM1 parameter and returns itself for method-chaining and easier to use config API.Configs related to the CANdi™ branded device's PWM interface on the Signal 1 input (S1IN)
All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction.
Parameter list:
- Parameters:
newPWM1- Parameter to modify- Returns:
- Itself
-
withPWM2
Modifies this configuration's PWM2 parameter and returns itself for method-chaining and easier to use config API.Configs related to the CANdi™ branded device's PWM interface on the Signal 2 input (S2IN)
All the configs related to the PWM interface for the CANdi™ branded device on S1, including absolute sensor offset, absolute sensor discontinuity point and sensor direction.
Parameter list:
- Parameters:
newPWM2- Parameter to modify- Returns:
- Itself
-
toString
-
serialize
Get the serialized form of this configuration.- Specified by:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-