using System; using System.Threading; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using CPF; namespace UnitTests { [TestClass] public class UnitTest_MotherBoard_GPS { [TestMethod] public void TestGPS() { MotherBoard motherboard = MotherBoard.Instance; motherboard.EnableChannelPower(15); gpsUBlox.GPSPositionStruct gpsPosition = new gpsUBlox.GPSPositionStruct(); GPS1 gps = GPS1.Instance; int i = 5; while (--i > 0 ) { gps.synchToGPSTime(); Thread.Sleep(3000); gpsPosition = gps.getPosition(); Debug.Print(gpsPosition.latSB.ToString() + " " + gpsPosition.lonSB.ToString()); Thread.Sleep(3000); } } } }