| | |
| | | sensor.values = Math.Round(BitConverter.ToSingle(tempBytes, 0), 1); |
| | | break; |
| | | } |
| | | switch (receiveBytes[4]) |
| | | { |
| | | case 2: |
| | | if (receiveBytes[1] == 5)//TVOC需求除以100000 |
| | | sensor.values /= 100000; |
| | | break; |
| | | } |
| | | EnvironmentalSciencePage.LoadEvent_UpdataStatus(sensor); |
| | | } |
| | | } |
| | |
| | | string tempFileName = nameValueCollection["Command"].Replace("Get", ""); |
| | | if ("AllFiles" == tempFileName) |
| | | { |
| | | byte[] bytes = Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(FileUtils.ReadFiles())); |
| | | byte[] bytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(FileUtils.ReadFiles())); |
| | | outputStream.Write(bytes, 0, bytes.Length); |
| | | outputStream.Flush(); |
| | | } |