Factory Reset ?

Forums:

Is there any sort of command that will reset any saved settings in the Ultraborg PIC controller, or does the controller only save the servo positions and the tuning GUI would reset them.

piborg's picture

The controller only saves the positions it is calibrated to, it does not have any special reset command.

You can reset all of the positions using the large button at the bottom of the Tuning GUI.

Alternatively you can reset all of the values with this Python code:

#!/usr/bin/env python
# coding: latin-1

# Import library functions we need 
import UltraBorg

# Start the UltraBorg
UB = UltraBorg.UltraBorg()      # Create a new UltraBorg object
UB.Init()                       # Set the board up (checks the board is connected)

# Calibration settings
STD_PWM_MIN = 2000              # Default minimum position (2000 = 1 ms)
STD_PWM_MAX = 4000              # Default maximum position (2000 = 1 ms)
STD_PWM_START = 0xFFFF          # Default startup position (unset, calculates centre)

# Set all values back to standard
UB.SetWithRetry(UB.SetServoMaximum1, UB.GetServoMaximum1, STD_PWM_MAX, 5)
UB.SetWithRetry(UB.SetServoMinimum1, UB.GetServoMinimum1, STD_PWM_MIN, 5)
UB.SetWithRetry(UB.SetServoStartup1, UB.GetServoStartup1, STD_PWM_START, 5)
UB.SetWithRetry(UB.SetServoMaximum2, UB.GetServoMaximum2, STD_PWM_MAX, 5)
UB.SetWithRetry(UB.SetServoMinimum2, UB.GetServoMinimum2, STD_PWM_MIN, 5)
UB.SetWithRetry(UB.SetServoStartup2, UB.GetServoStartup2, STD_PWM_START, 5)
UB.SetWithRetry(UB.SetServoMaximum3, UB.GetServoMaximum3, STD_PWM_MAX, 5)
UB.SetWithRetry(UB.SetServoMinimum3, UB.GetServoMinimum3, STD_PWM_MIN, 5)
UB.SetWithRetry(UB.SetServoStartup3, UB.GetServoStartup3, STD_PWM_START, 5)
UB.SetWithRetry(UB.SetServoMaximum4, UB.GetServoMaximum4, STD_PWM_MAX, 5)
UB.SetWithRetry(UB.SetServoMinimum4, UB.GetServoMinimum4, STD_PWM_MIN, 5)
UB.SetWithRetry(UB.SetServoStartup4, UB.GetServoStartup4, STD_PWM_START, 5)

I have attached the script below if you want to download it.

Attachments: 

Thank u

Subscribe to Comments for "Factory Reset ?"