using System; using Microsoft.SPOT; using Microsoft.VisualStudio.TestTools.UnitTesting; using CPF; using System.Text; using System.Threading; using HWModules; using SWModules; namespace CPFUnitTests { class CTDUnitTests { [TestMethod] public void TestCTD() { HWModules.MotherBoard motherboard = HWModules.MotherBoard.Instance; CTD1 ctd1 = CTD1.Instance; MessageQueue messageQ = MessageQueue.Instance; motherboard.EnableChannelPower((int)HWModules.MotherBoard.ChannelNames.CTDChannel); ctd1.init(); for (int i = 0; i < 10; i++) { messageQ.processQ(); Thread.Sleep(1000); } ctd1.sendCRLF(); for (int i = 0; i < 3; i++) { messageQ.processQ(); Thread.Sleep(1000); } for(int i=0; i<10000; i++) { ctd1.sendFastPressure(); for(int j=0; j<5; j++) { messageQ.processQ(); Thread.Sleep(1000); } } //ctd1.sendPumpon(); //for (int i = 0; i < 5; i++) //{ // messageQ.processQ(); // Thread.Sleep(1000); //} //ctd1.sendPumpoff(); //for (int i = 0; i < 10; i++) //{ // messageQ.processQ(); // Thread.Sleep(1000); //} } } }