PluginDocumentation

From Torque Wiki
Revision as of 21:05, 14 May 2014 by Ihawkins (talk | contribs)
⧼monobook-jumptonavigation⧽⧼monobook-jumptosearch⧽

There is an example 'plugin' that demonstrates how to use the plugin interface in Torque here: [[1]] - this is a basic example, have a look at the AIDL file for the API documentation

There is a forum post here: [[2]] that explains some more about plugin development

Torque also responds to intents - you can send or listen to the following intents:

org.prowl.torque.REQUEST_TORQUE_QUIT    (Properly shuts down Torque and related services)

org.prowl.torque.OBD_CONNECTED          (Sent when Torque connects to an OBD2 adapter)
org.prowl.torque.OBD_DISCONNECTED       (Sent when Torque is disconnected from the OBD2 adapter)
org.prowl.torque.APP_LAUNCHED           (Sent when Torque starts up)
org.prowl.torque.APP_QUITTING           (Sent when Torque is about to quit)

Here is a list of some of the extended information Torque provides which your plugin can call on, or you can use for custom themes - a full list of what torque supports for your vehicle can be viewed using the TorqueScan plugin:

Identifier Description
0x03 Fuel system status
0x04 Calculated engine load value
0x05 Engine coolant temperature
0x06 Short term fuel trim (bank 1)
0x07 Long term fuel trim (bank 1)
0x08 Short term fuel trim (bank 2)
0x09 Long term fuel trim (bank 2)
0x0a Fuel pressure
0x0b Intake manifold absolute pressure (MAP)
0x0c Engine RPM
0x0d Vehicle speed
0x0e Timing advance
0x0f Intake air temperature (IAT)
0x10 Mass air flow rate (MAF)
0x11 Throttle position (at manifold), this is not the accelerator pedal, and this is a relative reading.
(Rest of PIDs(above) are as per MODE $01 SAE spec), next follows Torque internal PIDs
0xff1005 GPS Longitude
0xff1006 GPS Latitude
0xff1001 GPS Speed
0xff1010 GPS Height
0xff1007 GPS Bearing
0xff1201 MPG
0xff1202 Turbo Boost
0xff1203 Kilometers Per Litre
0xff1205 Trip MPG
0xff1206 Trip KPL
0xff1207 Litres per Kilometre
0xff1208 Trip LPK
0xff120A Manifold Vacuum
0xff120B GPS Trip distance
0xff120C Vehicle distance (Odometer) saved with profile
0xff1220 Accelerometer (X)
0xff1221 Accelerometer (Y)
0xff1222( Accelerometer (Z)
0xff1223 Accelerometer (Total)
0xff1225 Torque
0xff1226 Horsepower
0xff122d 0-60 mph time
0xff122e 0-100 kph time
0xff122f Quarter mile time
0xff1230 eighth mile time
0xff1237 GPS vs OBD speed diff
0xff1238 Voltage
0xff1239 GPS Accuracy
0xff123A GPS Satellites locked
0xff123B GPS bearing
0xff1249 AFR
0xff1214->ff121B O2 Sensors 1x1->1x4, 2x1->2x4
0xff1240->ff1247 O2 Eqv Ratio 1->8
0xff1257 CO2 in G/KM
0xff1258 CO2 in G/KM average
0xff125a Fuel rate
0xff125b Fuel cost (trip)
0xff125c Fuel used (trip)
0xff1255 Torque RPM component
0xff1256 HorsePower RPM component
0xff124d Commanded AFR
0xff1249 Measured AFR

Extended PIDs are as shown by their 'PID' in the PID editor (Settings->Manage extended PIDs->tap on a PID for more information). You can use the ['TorqueScan'] plugin to get a full list of these IDs