-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclLogToFile.vb
More file actions
28 lines (25 loc) · 1.16 KB
/
Copy pathclLogToFile.vb
File metadata and controls
28 lines (25 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Public Class clLogToFile
Private StartTime As Date
Private LogToFile As System.Text.StringBuilder
Public Sub New()
LogToFile = New System.Text.StringBuilder
StartTime = Now
End Sub
Public Sub LogWheelFFBIn(pConstMagnitude As Short)
LogToFile.AppendLine(CInt(Now.Subtract(StartTime).TotalMilliseconds).ToString & vbTab & pConstMagnitude.ToString())
End Sub
Public Sub LogWheelPosInOut(pPos As Integer)
'LogToFile.AppendLine(CInt(Now.Subtract(StartTime).TotalMilliseconds).ToString & vbTab & vbTab & pPos.ToString())
End Sub
Public Sub LogWheelMotorOut(pPower As Integer, pPos As Integer)
LogToFile.AppendLine(CInt(Now.Subtract(StartTime).TotalMilliseconds).ToString & vbTab & vbTab & pPos.ToString() & vbTab & pPower.ToString())
End Sub
Public Sub SaveToFile()
retr:
Try
IO.File.WriteAllText("CVJoyLog-Wheel.csv", "Millisec" & vbTab & "FfbIn" & vbTab & "PosInOut" & vbTab & "MotorOut" & vbCrLf & LogToFile.ToString())
Catch ex As Exception
If MsgBox(ex.Message, MsgBoxStyle.RetryCancel) = MsgBoxResult.Retry Then GoTo retr
End Try
End Sub
End Class