RaceCapturePro Lua Scripting: Difference between revisions
(→Scripting functions for RaceCapture/Pro: some docs) |
|||
Line 6: | Line 6: | ||
Retrieves the state of the GPIO ports | Retrieves the state of the GPIO ports | ||
state getGpio(port) | '''state getGpio(port)''' | ||
*params: port - integer 0 - 2 | *params: port - integer 0 - 2 | ||
Line 18: | Line 18: | ||
Sets the state of the GPIO port when the port is configured for output mode. | Sets the state of the GPIO port when the port is configured for output mode. | ||
setGpio(port, state) | '''setGpio(port, state)''' | ||
*params: port - integer 0 - 2, state - 1 = output active; 0 = output inactive | *params: port - integer 0 - 2, state - 1 = output active; 0 = output inactive | ||
Line 30: | Line 30: | ||
Gets the state of the front panel pushbutton. | Gets the state of the front panel pushbutton. | ||
state getButton() | '''state getButton()''' | ||
*params: none | *params: none | ||
Line 38: | Line 38: | ||
Indicates if an SD card is present in the socket | Indicates if an SD card is present in the socket | ||
present isSDCardPresent() | '''present isSDCardPresent()''' | ||
*params: none | *params: none | ||
Line 45: | Line 45: | ||
===isSDCardWritable=== | ===isSDCardWritable=== | ||
Indicates if the SD card is writable (lock switch on SD card is active) | Indicates if the SD card is writable (lock switch on SD card is active) | ||
'''writable isSDCardWritable()''' | |||
*params: none | *params: none |
Revision as of 15:22, 2 April 2013
This page is under construction. Check back soon!
Scripting functions for RaceCapture/Pro
getGpio
Retrieves the state of the GPIO ports
state getGpio(port)
- params: port - integer 0 - 2
- returns: 1 = port is high, 0 = port is low
When the port is configured for input mode, a voltage high input (> 2 volts) will read as 1; a voltage low will read as 0. A disconnected port will read as high due to the internal pullup resistor.
When the port is configured as output, the port reads 1 when the port is activated (output transistor is connected to ground) and 0 when the port is deactivated (pullup resistor is active)
setGpio
Sets the state of the GPIO port when the port is configured for output mode.
setGpio(port, state)
- params: port - integer 0 - 2, state - 1 = output active; 0 = output inactive
- returns: none
When the state specified is 1, the output is active (transistor is conneced to ground). When state is 0, transistor is disconnected, and pullup resistor is active.
When configured for input mode this function has no effect.
getButton
Gets the state of the front panel pushbutton.
state getButton()
- params: none
- returns: 1 = pushbutton is depressed; 0 = pushbutton is not depressed
isSDCardPresent
Indicates if an SD card is present in the socket
present isSDCardPresent()
- params: none
- returns: 1 = SD card is present in socket; 0 = SD card not present
isSDCardWritable
Indicates if the SD card is writable (lock switch on SD card is active)
writable isSDCardWritable()
- params: none
- returns: 1 = SD card is writable; 0 = SD card is not writable