:py:mod:`phoenix6.configs.canrange_configs` =========================================== .. py:module:: phoenix6.configs.canrange_configs Module Contents --------------- .. py:class:: CANrangeConfiguration 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 CANrange .. py:attribute:: future_proof_configs :type: bool :value: True True 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. .. py:attribute:: custom_params :type: phoenix6.configs.config_groups.CustomParamsConfigs Custom Params. Custom paramaters that have no real impact on controller. Parameter list: - CustomParamsConfigs.custom_param0 - CustomParamsConfigs.custom_param1 .. py:attribute:: to_f_params :type: phoenix6.configs.config_groups.ToFParamsConfigs Configs that affect the ToF sensor Includes Update mode and frequency Parameter list: - ToFParamsConfigs.update_mode - ToFParamsConfigs.update_frequency .. py:attribute:: proximity_params :type: phoenix6.configs.config_groups.ProximityParamsConfigs Configs that affect the ToF Proximity detection Includes proximity mode and the threshold for simple detection Parameter list: - ProximityParamsConfigs.proximity_threshold - ProximityParamsConfigs.proximity_hysteresis - ProximityParamsConfigs.min_signal_strength_for_valid_measurement .. py:attribute:: fov_params :type: phoenix6.configs.config_groups.FovParamsConfigs Configs that affect the ToF Field of View Includes range and center configs Parameter list: - FovParamsConfigs.fov_center_x - FovParamsConfigs.fov_center_y - FovParamsConfigs.fov_range_x - FovParamsConfigs.fov_range_y .. py:method:: with_custom_params(new_custom_params: phoenix6.configs.config_groups.CustomParamsConfigs) -> CANrangeConfiguration Modifies this configuration's custom_params 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: - CustomParamsConfigs.custom_param0 - CustomParamsConfigs.custom_param1 :param new_custom_params: Parameter to modify :type new_custom_params: CustomParamsConfigs :returns: Itself :rtype: CANrangeConfiguration .. py:method:: with_to_f_params(new_to_f_params: phoenix6.configs.config_groups.ToFParamsConfigs) -> CANrangeConfiguration Modifies this configuration's to_f_params parameter and returns itself for method-chaining and easier to use config API. Configs that affect the ToF sensor Includes Update mode and frequency Parameter list: - ToFParamsConfigs.update_mode - ToFParamsConfigs.update_frequency :param new_to_f_params: Parameter to modify :type new_to_f_params: ToFParamsConfigs :returns: Itself :rtype: CANrangeConfiguration .. py:method:: with_proximity_params(new_proximity_params: phoenix6.configs.config_groups.ProximityParamsConfigs) -> CANrangeConfiguration Modifies this configuration's proximity_params parameter and returns itself for method-chaining and easier to use config API. Configs that affect the ToF Proximity detection Includes proximity mode and the threshold for simple detection Parameter list: - ProximityParamsConfigs.proximity_threshold - ProximityParamsConfigs.proximity_hysteresis - ProximityParamsConfigs.min_signal_strength_for_valid_measurement :param new_proximity_params: Parameter to modify :type new_proximity_params: ProximityParamsConfigs :returns: Itself :rtype: CANrangeConfiguration .. py:method:: with_fov_params(new_fov_params: phoenix6.configs.config_groups.FovParamsConfigs) -> CANrangeConfiguration Modifies this configuration's fov_params parameter and returns itself for method-chaining and easier to use config API. Configs that affect the ToF Field of View Includes range and center configs Parameter list: - FovParamsConfigs.fov_center_x - FovParamsConfigs.fov_center_y - FovParamsConfigs.fov_range_x - FovParamsConfigs.fov_range_y :param new_fov_params: Parameter to modify :type new_fov_params: FovParamsConfigs :returns: Itself :rtype: CANrangeConfiguration .. py:method:: serialize() -> str Get the serialized form of this configuration :returns: Serialized form of this config group :rtype: str .. py:method:: deserialize(to_deserialize: str) -> phoenix6.status_code.StatusCode Take a string and deserialize it to this configuration :returns: Return code of the deserialize method :rtype: str .. py:class:: CANrangeConfigurator(id: phoenix6.hardware.device_identifier.DeviceIdentifier) Bases: :py:obj:`phoenix6.configs.parent_configurator.ParentConfigurator` * 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 CANrange .. py:method:: refresh(configs: phoenix6.configs.config_groups.SupportsSerialization, timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode Refreshes the values of the specified config group. Call to refresh the selected configs from the device. :param configs: The configs to refresh :type configs: name :param timeout_seconds: Maximum amount of time to wait when performing configuration :type timeout_seconds: second :returns: StatusCode of refreshing the configs :rtype: StatusCode .. py:method:: apply(configs: phoenix6.configs.config_groups.SupportsSerialization, timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode Applies the contents of the specified config to the device. Call to apply the selected configs. :param configs: Configs to apply :type configs: SupportsSerialization :param timeout_seconds: Maximum amount of time to wait when performing configuration :type timeout_seconds: second :returns: StatusCode of the apply method :rtype: StatusCode .. py:method:: clear_sticky_faults(timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode 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. :param timeout_seconds: Maximum time to wait up to in seconds. :type timeout_seconds: second :returns: StatusCode of the set command :rtype: StatusCode .. py:method:: clear_sticky_fault_hardware(timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode 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. :param timeout_seconds: Maximum time to wait up to in seconds. :type timeout_seconds: second :returns: StatusCode of the set command :rtype: StatusCode .. py:method:: clear_sticky_fault_undervoltage(timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode 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. :param timeout_seconds: Maximum time to wait up to in seconds. :type timeout_seconds: second :returns: StatusCode of the set command :rtype: StatusCode .. py:method:: clear_sticky_fault_boot_during_enable(timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode 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. :param timeout_seconds: Maximum time to wait up to in seconds. :type timeout_seconds: second :returns: StatusCode of the set command :rtype: StatusCode .. py:method:: clear_sticky_fault_unlicensed_feature_in_use(timeout_seconds: phoenix6.units.second = 0.1) -> phoenix6.status_code.StatusCode 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. :param timeout_seconds: Maximum time to wait up to in seconds. :type timeout_seconds: second :returns: StatusCode of the set command :rtype: StatusCode