Creating logger timed out
in C#
Hi everyone
I have a small project where I want to try out the logging system of the MetaWear-sensor. For this I'm using the .NETStandard implementation extended by @FrozenKiwi (see post: https://mbientlab.com/community/discussion/2266/xamarin-forms-support#latest).
While adding a new routing to the gyro (IGyroBmi160) which dictates to log data I'm getting an exception saying "Creating logger timed out". My code looks like this:
var logging = _board.GetModule<ILogging>();
var gyro = _board.GetModule<IGyroBmi160>();
if (gyro == null)
return;
gyro.Configure(OutputDataRate._50Hz, DataRange._1000dps);
await gyro.AngularVelocity.AddRouteAsync(source =>
{
source.Log(data =>
{
var angularVelocity = data.Value<AngularVelocity>();
OnStatusChanged?.Invoke(this, new StatusChangedEventArgs(angularVelocity.ToString()));
});
});
logging.Start(true);
gyro.AngularVelocity.Start();
gyro.Start();
await Task.Delay(TimeSpan.FromSeconds(8));
logging.Stop();
await logging.DownloadAsync(100, (nEntries, totalEntries) =>
{
OnStatusChanged?.Invoke(this, new StatusChangedEventArgs($"Progress update = {nEntries}/{totalEntries}"));
});
logging.ClearEntries();
What am I doing wrong?
This discussion has been closed.
Comments
AddRouteAsync
throws this exception.