private void LogValuePickTimer_Elapsed(object sender, ElapsedEventArgs e) { var log = new SensorInfoResponse { Force = CurrentSensorValue, RobotInfo = CurrentRobotInfo, TimeStamp = e.SignalTime.ToFileTime() }; logBuffer.Add(log); }
private void MessageSendTimer_Elapsed(object sender, ElapsedEventArgs e) { var responce = new SensorInfoResponse(); responce.Force = CurrentSensorValue; responce.RobotInfo = CurrentRobotInfo; responce.TimeStamp = e.SignalTime.ToFileTime(); //sendBefore = e.SignalTime; var resStr = JsonConvert.SerializeObject(responce); // Console.WriteLine($"updated: {ii}\n{data.StatusCode}"); SendMessageToAllAsync(resStr, AppConst.NON_BOM_UTF8_ENCORDING); }