Class CANrangeConfigurator

java.lang.Object
com.ctre.phoenix6.configs.ParentConfigurator
com.ctre.phoenix6.configs.CANrangeConfigurator

Class for CANrange, a CAN based Time of Flight (ToF) sensor that measures the distance to the front of the device. This handles the configurations for the CANrange
  • Constructor Details

  • Method Details

    • refresh

      Refreshes the values of the specified config group.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      Returns:
      StatusCode of refreshing the configs
    • refresh

      public StatusCode refresh(CANrangeConfiguration configs, double timeoutSeconds)
      Refreshes the values of the specified config group.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of refreshing the configs
    • apply

      Applies the contents of the specified config to the device.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      Returns:
      StatusCode of the set command
    • apply

      public StatusCode apply(CANrangeConfiguration configs, double timeoutSeconds)
      Applies the contents of the specified config to the device.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of the set command
    • refresh

      Refreshes the values of the specified config group.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      Returns:
      StatusCode of refreshing the configs
    • refresh

      public StatusCode refresh(CustomParamsConfigs configs, double timeoutSeconds)
      Refreshes the values of the specified config group.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of refreshing the configs
    • apply

      Applies the contents of the specified config to the device.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      Returns:
      StatusCode of the set command
    • apply

      public StatusCode apply(CustomParamsConfigs configs, double timeoutSeconds)
      Applies the contents of the specified config to the device.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of the set command
    • refresh

      Refreshes the values of the specified config group.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      Returns:
      StatusCode of refreshing the configs
    • refresh

      public StatusCode refresh(ToFParamsConfigs configs, double timeoutSeconds)
      Refreshes the values of the specified config group.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of refreshing the configs
    • apply

      public StatusCode apply(ToFParamsConfigs configs)
      Applies the contents of the specified config to the device.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      Returns:
      StatusCode of the set command
    • apply

      public StatusCode apply(ToFParamsConfigs configs, double timeoutSeconds)
      Applies the contents of the specified config to the device.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of the set command
    • refresh

      Refreshes the values of the specified config group.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      Returns:
      StatusCode of refreshing the configs
    • refresh

      public StatusCode refresh(ProximityParamsConfigs configs, double timeoutSeconds)
      Refreshes the values of the specified config group.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of refreshing the configs
    • apply

      Applies the contents of the specified config to the device.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      Returns:
      StatusCode of the set command
    • apply

      public StatusCode apply(ProximityParamsConfigs configs, double timeoutSeconds)
      Applies the contents of the specified config to the device.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of the set command
    • refresh

      Refreshes the values of the specified config group.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      Returns:
      StatusCode of refreshing the configs
    • refresh

      public StatusCode refresh(FovParamsConfigs configs, double timeoutSeconds)
      Refreshes the values of the specified config group.

      Call to refresh the selected configs from the device.

      Parameters:
      configs - The configs to refresh
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of refreshing the configs
    • apply

      public StatusCode apply(FovParamsConfigs configs)
      Applies the contents of the specified config to the device.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      Returns:
      StatusCode of the set command
    • apply

      public StatusCode apply(FovParamsConfigs configs, double timeoutSeconds)
      Applies the contents of the specified config to the device.

      Call to apply the selected configs.

      Parameters:
      configs - Configs to apply against.
      timeoutSeconds - Maximum amount of time to wait when performing configuration
      Returns:
      StatusCode of the set command
    • clearStickyFaults

      Clear the sticky faults in the device.

      This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Returns:
      StatusCode of the set command
    • clearStickyFaults

      public StatusCode clearStickyFaults(double timeoutSeconds)
      Clear the sticky faults in the device.

      This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Parameters:
      timeoutSeconds - Maximum time to wait up to in seconds.
      Returns:
      StatusCode of the set command
    • clearStickyFault_Hardware

      Clear sticky fault: Hardware fault occurred

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Returns:
      StatusCode of the set command
    • clearStickyFault_Hardware

      public StatusCode clearStickyFault_Hardware(double timeoutSeconds)
      Clear sticky fault: Hardware fault occurred

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Parameters:
      timeoutSeconds - Maximum time to wait up to in seconds.
      Returns:
      StatusCode of the set command
    • clearStickyFault_Undervoltage

      Clear sticky fault: Device supply voltage dropped to near brownout levels

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Returns:
      StatusCode of the set command
    • clearStickyFault_Undervoltage

      public StatusCode clearStickyFault_Undervoltage(double timeoutSeconds)
      Clear sticky fault: Device supply voltage dropped to near brownout levels

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Parameters:
      timeoutSeconds - Maximum time to wait up to in seconds.
      Returns:
      StatusCode of the set command
    • clearStickyFault_BootDuringEnable

      Clear sticky fault: Device boot while detecting the enable signal

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Returns:
      StatusCode of the set command
    • clearStickyFault_BootDuringEnable

      public StatusCode clearStickyFault_BootDuringEnable(double timeoutSeconds)
      Clear sticky fault: Device boot while detecting the enable signal

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Parameters:
      timeoutSeconds - Maximum time to wait up to in seconds.
      Returns:
      StatusCode of the set command
    • clearStickyFault_UnlicensedFeatureInUse

      Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.

      This will wait up to ParentConfigurator.DefaultTimeoutSeconds.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Returns:
      StatusCode of the set command
    • clearStickyFault_UnlicensedFeatureInUse

      public StatusCode clearStickyFault_UnlicensedFeatureInUse(double timeoutSeconds)
      Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.

      This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.

      Parameters:
      timeoutSeconds - Maximum time to wait up to in seconds.
      Returns:
      StatusCode of the set command