1.1 --- a/GUI/SensorFrontView.cs Sat Apr 13 00:43:25 2013 +0200
1.2 +++ b/GUI/SensorFrontView.cs Sun Apr 14 22:38:41 2013 +0200
1.3 @@ -155,31 +155,36 @@
1.4 string format = "";
1.5 switch (sensor.SensorType)
1.6 {
1.7 - case SensorType.Voltage: format = "{0}: {1:F2} V"; break;
1.8 - case SensorType.Clock: format = "{0}: {1:F0} MHz"; break;
1.9 - case SensorType.Load: format = "{0}: {1:F1} %"; break;
1.10 - case SensorType.Temperature: format = "{0}: {1:F1} °C"; break;
1.11 - case SensorType.Fan: format = "{0}: {1:F0} RPM"; break;
1.12 - case SensorType.Flow: format = "{0}: {1:F0} L/h"; break;
1.13 - case SensorType.Control: format = "{0}: {1:F1} %"; break;
1.14 - case SensorType.Level: format = "{0}: {1:F1} %"; break;
1.15 - case SensorType.Power: format = "{0}: {1:F0} W"; break;
1.16 - case SensorType.Data: format = "{0}: {1:F0} GB"; break;
1.17 - case SensorType.Factor: format = "{0}: {1:F3} GB"; break;
1.18 + case SensorType.Voltage: format = "{0:F2}V"; break;
1.19 + case SensorType.Clock: format = "{0:F0}MHz"; break;
1.20 + case SensorType.Load: format = "{0:F1}%"; break;
1.21 + //iMON VFD escape sequence for Celsius
1.22 + case SensorType.Temperature: format = "{0:F0}\x001A"; break;
1.23 + case SensorType.Fan: format = "{0:F0}RPM"; break;
1.24 + case SensorType.Flow: format = "{0:F0}L/h"; break;
1.25 + case SensorType.Control: format = "{0:F1}%"; break;
1.26 + case SensorType.Level: format = "{0:F1}%"; break;
1.27 + case SensorType.Power: format = "{0:F0}W"; break;
1.28 + case SensorType.Data: format = "{0:F0}GB"; break;
1.29 + case SensorType.Factor: format = "{0:F3}GB"; break;
1.30 }
1.31 - string formattedValue = string.Format(format, sensor.Name, sensor.Value);
1.32 + string formattedValue = string.Format(format, sensor.Value);
1.33
1.34 if (sensor.SensorType == SensorType.Temperature &&
1.35 unitManager.TemperatureUnit == TemperatureUnit.Fahrenheit)
1.36 {
1.37 - format = "{0}: {1:F1} °F";
1.38 - formattedValue = string.Format(format, sensor.Name,
1.39 - UnitManager.CelsiusToFahrenheit(sensor.Value));
1.40 + //iMON VFD escape sequence for Fahrenheit
1.41 + format = "{0:F0}\x001B";
1.42 + formattedValue = string.Format(format, UnitManager.CelsiusToFahrenheit(sensor.Value));
1.43 }
1.44
1.45 - iFirstLine = sensor.Hardware.Name;
1.46 + //iFirstLine = sensor.Hardware.Name;
1.47 + //iSecondLine = sensor.Name+ ":" + formattedValue;
1.48 +
1.49 + iFirstLine = sensor.Name;
1.50 iSecondLine = formattedValue;
1.51
1.52 +
1.53 }
1.54 }
1.55 }