Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;tharrell.net
- ss$=OpenFileRequester("","torqueTrackLog.csv","*.csv",0)
- aa$="Fuel trim bank 1 sensor 1(%)"
- bb$="Fuel trim bank 2 sensor 1(%)"
- If Len(ss$)>0
- If ReadFile(0,ss$)
- While Eof(0)=0
- cc$=ReadString(0)
- For i = 1 To CountString(cc$,",")
- If StringField(cc$,i,",")=aa$ : t1.f=i : EndIf
- If StringField(cc$,i,",")=bb$ : t2.f=i : EndIf
- If t1.f>0.0 And i=t1.f And CountString(StringField(cc$,i,","),"-")=0 : tavg1.f=tavg1.f+ValF(StringField(cc$,t1.f,",")) : t1c.f=t1c.f+1.0 : EndIf
- If t2.f>0.0 And i=t2.f And CountString(StringField(cc$,i,","),"-")=0 : tavg2.f=tavg2.f+ValF(StringField(cc$,t2.f,",")) : t2c.f=t2c.f+1.0 : EndIf
- Next
- Wend
- CloseFile(0)
- Debug "Bank 1 Sensor 1 Trim Average: "+StrF((tavg1.f/t1c.f),2)+"%"
- Debug "Bank 1 Sensor 1 Trim Average: "+StrF((tavg2.f/t2c.f),2)+"%"
- EndIf
- EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement