Done... also, I changed the DT(x) values on loadsettings (all of them) to = Val(DT(1)) ... you had them going up to dt(8)...
Hi,
Due to a little inaccuracy in the phidget temperature sensor, I need to apply an offset to the sensor value.
Guino: Please could you add the following code to Road runner:
- modRoadRunner: New version of set PhidGet func
'Set PhidGet Temperature Sensor Info
Public Function GetPhid(CODE As String, Fmt As String) As String
Dim S As String
Dim N As Double
On Error Resume Next
'If can't find it, return N/A
If PH Is Nothing Then GetPhid = "N/A": Exit Function
'Get Sensor Value
N = PH.SensorValue(Val(Mid(CODE, 5)) - 1)
'apply offset (added by skippy76)
N = N + PHOffset(Val(Mid(CODE, 5)))
'Get Tip Data
S = Fmt
S = Mid(S, 2, Len(S) - 2)
'See if need to apply conversion
Select Case LCase(S)
Case "c2f"
'Show in C
N = N - 200: N = N / 4
N = (N * 9) / 5: N = N + 32
GetPhid = Format(N, "0.0F")
Case "f2c"
'Show in F
N = N - 200: N = N / 4
GetPhid = Format(N, "0.0C")
Case "volt"
'Show in V
N = N - 500: N = N * 0.06
GetPhid = Format(N, "0.00")
Case "50amp"
'Show in Amps
N = N - 500: N = N * 0.1
GetPhid = Format(N, "0.00")
Case "15amp"
'Show in Amps
N = N - 500: N = N * 0.03
GetPhid = Format(N, "0.00")
Case "gp"
'Show in Pressure
N = (N / 4) + 10
GetPhid = Format(N, "0.00")
Case Else
'Return Sensor Info
GetPhid = Format(N, S)
End Select
End Function
- Add this to the select in LoadSettings of rmLoader
' Phidget offset
Case "phidget1"
PHoffset(1) = DT(1)
Case "phidget2"
PHoffset(2) = DT(2)
Case "phidget3"
PHoffset(3) = DT(3)
Case "phidget4"
PHoffset(4) = DT(4)
Case "phidget5"
PHoffset(5) = DT(5)
Case "phidget6"
PHoffset(6) = DT(6)
Case "phidget7"
PHoffset(7) = DT(7)
Case "phidget8"
PHoffset(8) = DT(8)
- Add this line to the decs in the modRoadRunner module
Public PHoffset(6) As Long 'Phidget offsets
06 Volvo XC90
Use to have installed MII 10000/512Mb/40GB, Lilliput 7", OPUS 90W, Wifi-G PCMCIA, Head Unit Aux adapter, Delorme GPS, XM PCR, Audigy NX, RR
Car PC downloads: http://carpc.harteveldt.com/
Done... also, I changed the DT(x) values on loadsettings (all of them) to = Val(DT(1)) ... you had them going up to dt(8)...
Ride Runner RR's Myspace
"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
Excellent, thanks!
Well spotted on the DT(x)... I was a bit over zelest on the copy / paste changes I guess!
Your the man! (wht the woman still I hope!)
Andrew
06 Volvo XC90
Use to have installed MII 10000/512Mb/40GB, Lilliput 7", OPUS 90W, Wifi-G PCMCIA, Head Unit Aux adapter, Delorme GPS, XM PCR, Audigy NX, RR
Car PC downloads: http://carpc.harteveldt.com/
Bookmarks