public async override Task SetUp()
            {
                metawear = new MetaWearBoard(platform, platform);
                await metawear.InitializeAsync();

                AddCustomResponses();
            }
Exemple #2
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>();
        }
Exemple #3
0
        public async Task LongFirmwareAsync()
        {
            var firmware = "1.3.90";

            platform = new NunitPlatform(new InitializeResponse(firmware, typeof(IGpio), typeof(ILogging)));
            metawear = new MetaWearBoard(platform, platform);

            await metawear.InitializeAsync();

            var info = await metawear.ReadDeviceInformationAsync();

            Assert.That(info.FirmwareRevision, Is.EqualTo(firmware));
        }
Exemple #4
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));
        }
        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));
        }
Exemple #6
0
 public async virtual Task SetUp()
 {
     metawear = new MetaWearBoard(platform, platform);
     await metawear.InitializeAsync();
 }
 public virtual void SetUp()
 {
     metawear = new MetaWearBoard(platform, platform);
     metawear.InitializeAsync().Wait();
 }