ConfigValues - kizmit99/MechMind GitHub Wiki

MechMind provides many features that are configurable at run-time (versus compile-time). Some of these features are very hardware specific and once setup correctly, should probably not be changed. Some of these include:

  • Which controller type will be used for user input at runtime
  • Whether or not a PCA9685 based PWM controller is present or not
  • Which motor controller type is used to drive the feet motors
  • Which motor controller type is used to drive the dome motor
  • And, Which audio driver should be used for sounds

Most of the other configuration values are preset to what are hopefully "sane" values, but there may be situations where tweaking of these values could be of benefit.

These configuration attributes are modified through the use of the "setConfig" console command. See Console Command Documentation for more details.

R2D2 namespace

Key Type Values Description
Initialized boolean Whether or not the configuration data has been initialized
1 A value of 1 indicates initialization has already occurred
0 Any value other than 1 will result in the Brain performing a factory reset
Controller string Which controller type to instantiate on startup
SonyMove Instantiate the Dual Sony Move Controller
DualRing Instantiate the Dual BLE Ring Controller
None Instantiate the Stub Controller (which does nothing)
PWMService string Which PWM Service type to instantiate on startup
PCA9685 Instantiate the PCA9685 Driver
None Instantiate the Stub PWM Driver (which does nothing)
DriveMotor string Which Motor Driver should be instantiated to control the Drive (Feet) motors
Sabertooth Instantiate the Sabertooth driver (should be complete, but not tested)
Cytron Instantiate the Cytron driver (work in progress, not tested)
PWMMotor Instantiate the PWM Motor driver appropriate for DRV8871, L298N, etc.
None Instantiate the Stub Motor driver (which does nothing)
DomeMotor string Which Motor Driver should be instantiated to control the Dome (Rotation) motor
PWMMotor Instantiate the PWM Motor driver appropriate for DRV8871, L298N, etc.
None Instantiate the Stub Motor driver (which does nothing)
AudioDriver string Which Audio Driver should be instantiated for the playing of sounds
HCR Use the Human-Cyborg Relations driver
DFMini Use the DFPlayer Mini driver
SparkFun Use the SparkFun MP3 Trigger driver (not tested)
None Instantiate the Stub driver (which does nothing)
StartDriveOn boolean Controls whether or not the Drive stick should be enabled on startup
0 Drive stick is disabled on startup
1 Drive stick is enabled on startup
StartTurboOn boolean Controls whether the Drive system should start in Turbo mode on startup
0 Turbo mode disabled on startup
1 Turbo Mode enabled on startup
StartDomeOn boolean Controls whether the AutoDome functionality is enabled on startup
0 AutoDome disabled on startup (AutoDome may still auto-enable itself)
1 AutoDome enabled on startup

DualSony namespace

Key Type Values Description
RightMAC string XX:XX:XX:XX:XX:XX MAC address of the Right (Drive) controller. Set automatically when first controller connects.
RightAltMAC string XX:XX:XX:XX:XX:XX MAC address of the alternate Right (Drive) controller
LeftMAC string XX:XX:XX:XX:XX:XX MAC address of the Left (Dome) controller. Set automatically when second controller connects.
LeftAltMAC string XX:XX:XX:XX:XX:XX MAC address of the alternate Left (Dome) controller
activeTimeout integer (ms) During critical operations, no messages from the controller for greater than this many milliseconds will result in a critical fault being thrown, causing the droid to enter failsafe mode.
inactiveTimeout integer (ms) While not performing critical operations, no message from the controller for greater than this many milliseconds will result in a critical fault being thrown, causing the droid to enter failsafe mode.
badDataWindow integer (ms) Time in milliseconds after one bad data reading before another will be counted. Ten bad data windows in a row will throw an error condition.
DeadbandX integer Joystick center deadband in X axis
DeadbandY integer Joystick center deadband in Y axis

DualRingBLE namespace

Key Type Values Description
DriveMAC string XX:XX:XX:XX:XX:XX MAC address of the Right (Drive) controller. Set automatically when first controller connects.
DomeMAC string XX:XX:XX:XX:XX:XX MAC address of the Left (Dome) controller. Set automatically when second controller connects.

DomePWM namespace

Key Type Values Description
Timeout integer (ms) Driver will automatically stop the motor if it receives no new commands after this many milliseconds
Deadband integer (%) Drive commands to spin slower than this value will be forced to zero (stopped)
RampPowerPerMs float Rate at which the driver will increase or decrease motor speed, specified in percent power per millisecond

DrivePWM namespace

Key Type Values Description
Timeout integer (ms) Driver will automatically stop the motor if it receives no new commands after this many milliseconds
Deadband integer (percent) Drive commands to spin slower than this value will be forced to zero (stopped)
RampPowerPerMs float Rate at which the driver will increase or decrease motor speed, specified in percent power per millisecond

DriveSaber namespace

Key Type Values Description
Timeout integer (ms) Driver will automatically stop the motor if it receives no new commands after this many milliseconds
Deadband integer (percent) Drive commands to spin slower than this value will be forced to zero (stopped)
Ramping integer Value sent directly to Sabertooth controller – see Sabertooth documentation for more details
MinVoltage integer Value sent directly to Sabertooth controller – see Sabertooth documentation for more details
MaxVoltage integer Value sent directly to Sabertooth controller – see Sabertooth documentation for more details

DriveCytron namespace

Key Type Values Description
Timeout integer (ms) Driver will automatically stop the motor if it receives no new commands after this many milliseconds
Deadband integer (percent) Drive commands to spin slower than this value will be forced to zero (stopped)

DomeMgr namespace

Key Type Values Description
Speed integer (percent) Top speed (specified as percent of motor maximum) that the dome will rotate when under user control
360TimeMs integer (ms) The amount of time it takes the dome to complete one complete rotation (at maximum speed)
Deadband integer (percent) Joystick readings below this level will be considered centered (no movement)
AutoEnable boolean Master control for whether AutoDome functionality can be enabled (even if requested by user)
0 AutoDome functionality is completely disabled
1 AutoDome functionality may be enabled
AutoAutoEnable boolean Controls whether AutoDome functionality automatically engages after some period of inactivity
0 AutoDome functionality does not auto-enable after a period of inactivity
1 AutoDome functionality does auto-enable after a period of inactivity
AutoIdleMs integer (ms) The amount of time that must pass without any activity before AutoDome functionality may auto enable
AutoMinSpeed integer (percent) The minimum speed AutoDome movements will use (specified as percent of top speed)
AutoMaxSpeed integer (percent) The maximum speed AutoDome movements will use (specified as percent of top speed)
AutoMinDelayMs integer (ms) The minimum time between AutoDome movements (when enabled and active)
AutoMaxDelayMs integer (ms) The maximum time between AutoDome movements (when enabled and active)

DriveMgr namespace

Key Type Values Description
NormalSpeed integer (percent) Top speed the drive motors will achieve when joystick is pushed to maximum (specified as a percent of the motor maximum speed) when operating in Normal drive mode
TurboSpeed integer (percent) Top speed the drive motors will achieve when joystick is pushed to maximum (specified as a percent of the motor maximum speed) when operating in Turbo drive mode
TurnSpeed integer (percent) Top speed the drive motors will achieve when joystick is pushed to maximum (specified as a percent of the motor maximum speed) while turning
Deadband integer (percent) Joystick readings below this level will be considered centered (no movement)

AudioMgr namespace

Key Type Values Description
Volume float (0 to 1) The current volume setting
MaxVolume float (0 to 1) Maximum allowable volume level
MinVolume float (0 to 1) Minimum allowable volume level
RandomOn boolean Controls whether random murmurings are enabled or not
0 Random murmurings disabled
1 Random murmurings enabled
MinRandomMs integer (ms) Minimum time between random murmurings
MaxRandomMs integer (ms) Maximum time between random murmurings
CmdStaggerMs integer (ms) Minimum time between issuing audio commands (some audio drivers get confused if commanded too frequently)

ActionMgr namespace

Key Type Values Description
<Trigger> string <CommandList> These entries map Triggers (generated by the Controllers) into Command sequences to be executed

Panel namespace

Attribute Type Values Description
Panel<num>PWMOut integer The PWMService output pin associated to Panel <num>. Note that Panel numbers always start at 1, the maximum is defined in droid/core/hardware.h
Panel<num>Open integer (us) The PWM pulse width sent to Open Panel <num>'s Servo (specified in microseconds)
Panel<num>Close integer (ms) The PWM pulse width sent to Close Panel <num>'s Servo (specified in microseconds)
Panel<num>Time integer (ms) The length of time (in milliseconds) the Open/Close command will be active when changing the state of Panel <num>
⚠️ **GitHub.com Fallback** ⚠️