예제 #1
0
        static void DisplayScreenThree()
        {
            string mode = _thunderbolt.TimingMode == TimingModes.UTC ? "U" : "G";

            _lcdshield.WriteLine(0, DateTime.UtcNow.ToString(@"dd-MMM-yy \" + mode + " HH:mm:ss"));

            _lcdshield.SetCursorPosition(0, 1);
            var s = "Lat:  " + _thunderbolt.CurrentPosition.Latitude.ToString("N4");

            _lcdshield.Write(s);
            _lcdshield.WriteByte(7);
            _lcdshield.Write(StringExtension.PadLeft("", 16 - (s.Length + 1)));
            _lcdshield.Write("Alt:");

            _lcdshield.SetCursorPosition(0, 2);
            s = "Lon:  " + _thunderbolt.CurrentPosition.Longitude.ToString("N4");
            _lcdshield.Write(s);
            _lcdshield.WriteByte(7);
            _lcdshield.Write(StringExtension.PadLeft("", 14 - (s.Length + 1)));
            _lcdshield.Write(StringExtension.PadLeft(_thunderbolt.CurrentPosition.Altitude.ToString("N0") + "m", 6));

            _lcdshield.WriteLine(3, "Grid: " + StringExtension.PadRight(MaidenheadLocator.LatLongToLocator(_thunderbolt.CurrentPosition.Latitude, _thunderbolt.CurrentPosition.Longitude), 11) + GetAlarmIndicatorString());
        }