Copying txt PID file from Torque Pro

Hi, I have a txt PID file in Torque Pro with the formatting below, is there a simple way to import this filetype to AutoPi (as it’s quite long) or does it need to be done manually with the Car Explorer at my.autopi.io?

"Name", "ShortName", "ModeAndPID", "Equation", "Min Value", "Max Value", "Units", "Header", 
"startDiagnostic", "stopDiagnostic", "Scale"

"Fuel Trim Aggregate ","AggTrim","","[07]+[06]",-50,50,"%","null","null","null",1
"Intake Air Temp vs Ambient","IAT ∆","","val{zref_IATdt1}- 
val{zref_AmbTdt10}",0,50,"°F","null","null","null",1
 "Intake Manifold Relative Pressure","MRP","","([0B]*10- 
[ff1270])*.01454",-15,25,"PSI","null","null","null",1
 "MX5_A/C Refrigerant Pressure Switch","AC_REQ_SW","0x221104","BIT(A:0)",0,1,"On / 
Off","7e0","null","null",1
"MX5_A/C Relay","ACCS_SW","0x221101","BIT(A:0)",0,1,"On / Off","7e0","null","null",1
"MX5_Accel Pedal Position (full 
range)","APP","0x221340","A*0.3921568627",0,100,"%","7e0","null","null",1
1 Like

Its manual at the moment. But some hints that I’ve discovered -

To map torque pro variables to autopi python -

  • “a” -> “bytes_to_int(message.data[3:4])”
  • “b” -> “bytes_to_int(message.data[4:5])”
  • “c” -> “bytes_to_int(message.data[5:6])”
  • “aa” -> “bytes_to_int(message.data[29:30])”

Function conversions -

  • “SIGNED(singlebyte)” -> “twos_comp(singlebyte,8)”
  • “SIGNED(doublebyte)” -> “twos_comp(doublebyte,16)”

Mode and pid -

  • “2102” -> “Mode 21” and “Code 2”
  • “220101” -> “Mode 220” and “Code 101”

Header -

  • If set in last column, change default in autopi

Floats -

  • “x/100” -> “x/100.0”

So an example from the Kona electric, torque pro is -

000_Niro_Auxillary Battery Voltage,Aux Batt Volts,2102,(SIGNED(U)*256+T)/1000,11,14.6,V,7E2

autopi is mapped to -

  • Name: Aux_Batt_Volts
  • Description: Auxilliary Battery Voltage
  • Mode: 21
  • Code: 2
  • Header: 7E2
  • Bytes: 64 ( not in torque pro)
  • Formula: twos_comp(bytes_to_int(message.data[22:23])*256+bytes_to_int(message.data[23:24]),16)/1000.0
  • Unit: V
  • Min: 11
  • Max: 14.6
8 Likes