using System.Threading;
using HWModules;
using Microsoft.SPOT;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CPFUnitTests.UT_MotherBoard
{
    [TestClass]
    public class UnitTest_MotherBoard_GPS
    {
        [TestMethod]
        public void TestGPS()
        {
            HWModules.MotherBoard motherboard = HWModules.MotherBoard.Instance;
            motherboard.EnableChannelPower(15);

            gpsUBlox.GPSPosition gpsPosition = new gpsUBlox.GPSPosition();
            GPS1 gps = GPS1.Instance;

            int i = 5;

            while (--i > 0 )
            {
                gps.synchToGPSTime();
                Thread.Sleep(3000);

                gpsPosition = gps.getPUBX00Position();
                Debug.Print(gpsPosition.latSB.ToString() + "  " + gpsPosition.lonSB.ToString());
                Thread.Sleep(3000);
            }
        }
    }
}
