Esempio n. 1
0
        public async override Task SetUp()
        {
            platform.fileSuffix = "logging_time_refs";
            metawear            = new MetaWearBoard(platform, platform);

            await metawear.DeserializeAsync();

            await metawear.InitializeAsync();

            logging = metawear.GetModule <ILogging>();
        }
Esempio n. 2
0
        public async Task SameFirmware()
        {
            byte[][] expected =
            {
                new byte[] { 0x0b, 0x84 }
            };

            platform            = new NunitPlatform(new InitializeResponse());
            platform.fileSuffix = "gpio_feedback";

            metawear = new MetaWearBoard(platform, platform);
            await metawear.DeserializeAsync();

            await metawear.InitializeAsync();

            Assert.That(platform.GetConnectCommands(), Is.EqualTo(expected));
        }
Esempio n. 3
0
        public async Task NewFirmware()
        {
            byte[][] expected =
            {
                new byte[] { 0x01, 0x80 },
                new byte[] { 0x02, 0x80 },
                new byte[] { 0x03, 0x80 },
                new byte[] { 0x04, 0x80 },
                new byte[] { 0x05, 0x80 },
                new byte[] { 0x06, 0x80 },
                new byte[] { 0x07, 0x80 },
                new byte[] { 0x08, 0x80 },
                new byte[] { 0x09, 0x80 },
                new byte[] { 0x0a, 0x80 },
                new byte[] { 0x0b, 0x80 },
                new byte[] { 0x0c, 0x80 },
                new byte[] { 0x0d, 0x80 },
                new byte[] { 0x0f, 0x80 },
                new byte[] { 0x10, 0x80 },
                new byte[] { 0x11, 0x80 },
                new byte[] { 0x12, 0x80 },
                new byte[] { 0x13, 0x80 },
                new byte[] { 0x14, 0x80 },
                new byte[] { 0x15, 0x80 },
                new byte[] { 0x16, 0x80 },
                new byte[] { 0x17, 0x80 },
                new byte[] { 0x18, 0x80 },
                new byte[] { 0x19, 0x80 },
                new byte[] { 0xfe, 0x80 },
                new byte[] { 0x0b, 0x84 }
            };

            platform = new NunitPlatform(new InitializeResponse("1.3.4", typeof(IGpio), typeof(ILogging)))
            {
                fileSuffix = "scheduled_task"
            };

            metawear = new MetaWearBoard(platform, platform);
            await metawear.DeserializeAsync();

            await metawear.InitializeAsync();

            Assert.That(platform.GetConnectCommands(), Is.EqualTo(expected));
        }