
Originally Posted by
TrevorC2
Please can someone tell me the iBus message format for the PDC command? (0x60)
i.e 60 0E 3F A0 08 FF FF FF FF FF FF FF FF E6 02 1D
I am in the progress of creating a Can-Bus to iBus translator using a little Arduino micro processor. The motivation behind this is I have changed from an E46 BMW to an E84 BMW and hence gone from ibus to CAN Bus, I really needed to get steering wheel buttons back before I end up crashing!
So far I can read back CAN Bus data for Speed, Steering wheel buttons, RPM, temperature etc and translate them into IBus style commands that IbusRR and IBusCommunicatoRR understand.
I am stumped with the PDC command at the moment as I can find no documentation on the command format and don't know what IBusCommunicatoRR expects
Ultimately I would be better off creating my own plugin for RR as CAN Bus has a lot more engine and sensor data available than iBus. But, I'm not a
software programmer and I am still trying to get my head around COM calls and all that.
Cheers
Hi ,
Sorry for the late reply, havn't been here for a while
"FF" is where the value from the sensors are and here's the code.
Code:
Public Function SendToRRPDC(PDCIbusmsg As String, iniUnit As String) As Boolean
Dim i As Byte
Dim SensorRead As Integer
Dim RRSend As String
Dim PDCChar As String
Dim ResetTimer As Boolean
SendToRRPDC = False
For i = 6 To 13
SensorRead = Asc(Mid$(PDCIbusmsg, i, 1))
If SensorRead < 200 Then
PDCChar = PDCDistance(SensorRead, iniUnit)
SendToRRPDC = True
Else
PDCChar = "---"
End If
Select Case i
Case 6
RRSDK.SetUserVar "IBusCommunicatoRR_PDCRLS", PDCChar
int_pdcrls = SensorRead
Case 7
RRSDK.SetUserVar "IBusCommunicatoRR_PDCRRS", PDCChar
int_pdcrrs = SensorRead
Case 8
RRSDK.SetUserVar "IBusCommunicatoRR_PDCRLC", PDCChar
int_pdcrlc = SensorRead
Case 9
RRSDK.SetUserVar "IBusCommunicatoRR_PDCRRC", PDCChar
int_pdcrrc = SensorRead
Case 10
RRSDK.SetUserVar "IBusCommunicatoRR_PDCFLS", PDCChar
int_pdcfls = SensorRead
Case 11
RRSDK.SetUserVar "IBusCommunicatoRR_PDCFRS", PDCChar
int_pdcfrs = SensorRead
Case 12
RRSDK.SetUserVar "IBusCommunicatoRR_PDCFLC", PDCChar
int_pdcflc = SensorRead
Case 13
RRSDK.SetUserVar "IBusCommunicatoRR_PDCFRC", PDCChar
int_pdcfrc = SensorRead
End Select
Next i
End Function
Private Function PDCDistance(Distance As Integer, Unit As String) As String
Select Case Unit
Case "meter"
PDCDistance = Format(Distance)
Case "inch"
PDCDistance = Format(Distance * 0.393700787, "0.0")
Case "feet"
PDCDistance = Format(Distance * 0.032808399, "0.00")
End Select
End Function
Bookmarks