ROBOTC

TETRIX Functions Miscellaneous

 

Contents

 [hide
Color Key
Function:
Variable:


[edit] externalBattery

intrinsic const short propertyIndex(externalBattery, propertySystem, kSystemBatteryLevelExternal)
This function is used to check the current level of an external TETRIX/MATRIX battery level.
  int foo =  externalBattery;        //Creates an integer 'foo' and sets it equal to the external battery level


[edit] externalBatteryAvg

intrinsic const short propertyIndex(externalBatteryAvg, propertySystem, kSystemAvgBatteryLevelExternal)
This function is used to check the average level of an external TETRIX/MATRIX battery level over the past 20 samplings. Used to smooth out voltage spikes and drops, measured in millivolts (avalue of 9123 equals 9.123 volts).
  int foo =  externalBatteryAvg;        //Creates an integer 'foo' and sets it equal to the average external battery level


[edit] muxUpdateInterval

intrinsic word propertyIndex(muxUpdateInterval, propertySystem, kSystemFtcHubUpdateInterval)
Sets the amount of time, in milliseconds, between updates on the TETRIX/MATRIX controller's values. Default value of 10 ms.
  muxUpdateInterval = 25;        //Sets the update interval to 25 milliseconds


[edit] bSystemLeaveServosEnabledOnProgramStop

intrinsic bool propertyIndex(bSystemLeaveServosEnabledOnProgramStop, propertySystem, kSystemLeaveServosEnabledOnProgramStop)
When enabled (set to true) this will keep the servos in their last known position after the program ends, until the controller is manually turned off.
 bSystemLeaveServosEnabledOnProgramStop = true;        //Keeps servos held at last position after program ends


[edit] muxLowBatteryShutdown

intrinsic word propertyIndex(muxLowBatteryShutdown, propertySystem, kSystemBatteryShutdownExternal)
Note: This function is no longer supported and should be considered deprecated.
Sets the amount of consecutive 'low battery' readings that must occur before the program shuts down. Default value of 5 readings.
  muxLowBatteryShutdown = 10;        //Sets the low battery shutdown threshold to 10 consecutive counts.