All gauges are stored in /home/pi/.openauto/config/openauto_obd_gauges.ini file. Count parameter corresponds to number of configured gauges.
Below please find example of gauge configuration:
[ObdGauge_X] - Each configured gauge has its own section. X value is the 0-based index.
MinValue - Minimum value of the gauge.
MaxValue - Maximum value of the gauge
Limit - Maximum "safe" value of the gauge, e.g. maximum RPM value of the engine is 8000 but maximum safe value is 6800. If there is no such value for the gauge, it must have the same value as MaxValue parameter.
Label - Label of the gauge that will be displayed on a gauge.
Formula - Formula for calculation of the value displayed on gauge. Use getPidValue(index) function to get the value of a PID defined in openauto_obd_pids.ini file. It is also possible to enable/disable special diagnostic mode (e.g. in Nissan's cars) by executing queryPid(index) function.
Capabilities of the formula:
[ObdGauges]
Count=9
Below please find example of gauge configuration:
[ObdGauge_0]
MinValue=-40
MaxValue=215
Limit=90
Formula=getPidValue(1)
Label=Temp °C
;Formula=(getPidValue(1)*1.8)+32
;Label=Temp °F
[ObdGauge_X] - Each configured gauge has its own section. X value is the 0-based index.
MinValue - Minimum value of the gauge.
MaxValue - Maximum value of the gauge
Limit - Maximum "safe" value of the gauge, e.g. maximum RPM value of the engine is 8000 but maximum safe value is 6800. If there is no such value for the gauge, it must have the same value as MaxValue parameter.
Label - Label of the gauge that will be displayed on a gauge.
Formula - Formula for calculation of the value displayed on gauge. Use getPidValue(index) function to get the value of a PID defined in openauto_obd_pids.ini file. It is also possible to enable/disable special diagnostic mode (e.g. in Nissan's cars) by executing queryPid(index) function.
Capabilities of the formula:
Quote:Operators: +, -, *, /, %, ^
Functions: abs, avg, ceil, clamp, equal, erf, erfc, exp, expm1, floor, frac, log, log10, log1p, log2, logn, max, min, mul, ncdf, nequal, root, round, roundn, sgn, sqrt, sum, swap, trunc
Trigonometry: acos, acosh, asin, asinh, atan, atanh, atan2, cos, cosh, cot, csc, sec, sin, sinc, sinh, tan, tanh, hypot, rad2deg, deg2grad, deg2rad, grad2deg
Special Functions:
- getPidValue(index) - get value (by index) of the PID defined in openauto_obd_pids.ini file
- queryPid(index) - query the PID by index that corresponds to definition in openauto_obd_pids.ini file. This function always return 0. May be helpful to trigger special diagnostic mode (in e.g. Nissan's cars). Example usage: queryPid(0) + getPidValue(2) + queryPid(3) with assumption that PID with index 0 is the one that starts special diagnostic mode and PID with index 3 is the one that stops special diagnostic mode.
- getInjectedValue(id) - get value indjected by the API. Value of (id) parameter should corresponds to value used on client side of the API.