Пример #1
0
        public async Task InitConfigAsync()
        {
            var services = await ble.GetGattServicesForUuidAsync(model.ConfigServiceID);

            //TODO: check status
            service = services.Services[0];
            //LedStateConfig
            ledStateConfigSource = new DataSource <LEDStateConfig>(service, model.LEDStateConfigID);
            ledStateConfigSource.BeforeSubscribe  += () => current?.Unsubscribe();
            ledStateConfigSource.AfterUnsubscribe += () => current = ledStateConfigSource;
        }