From a7718ceae99b9f509ce00920fb01827d7dea3de2 Mon Sep 17 00:00:00 2001 From: "T. Thiery" Date: Sun, 15 Nov 2020 18:00:22 +0100 Subject: [PATCH] Removed flacky combined mode from examples #91 --- .../SharpBrick.PoweredUp.Examples/ExampleMarioBarcode.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/SharpBrick.PoweredUp.Examples/ExampleMarioBarcode.cs b/examples/SharpBrick.PoweredUp.Examples/ExampleMarioBarcode.cs index db8475e..49a2281 100644 --- a/examples/SharpBrick.PoweredUp.Examples/ExampleMarioBarcode.cs +++ b/examples/SharpBrick.PoweredUp.Examples/ExampleMarioBarcode.cs @@ -17,20 +17,15 @@ await mario.VerifyDeploymentModelAsync(modelBuilder => modelBuilder // for a normal scenario, a combined mode would not be needed. The tag sensor is able to detect brick colors AND the barcode on its own. The RGB scanner is neither very accurate and is scaled strangely. var tagSensor = mario.TagSensor; - await tagSensor.TryLockDeviceForCombinedModeNotificationSetupAsync(tagSensor.ModeIndexTag, tagSensor.ModeIndexRgb); await tagSensor.SetupNotificationAsync(tagSensor.ModeIndexTag, true); - await tagSensor.SetupNotificationAsync(tagSensor.ModeIndexRgb, true); - await tagSensor.UnlockFromCombinedModeNotificationSetupAsync(true); var d1 = tagSensor.BarcodeObservable.Subscribe(x => Log.LogWarning($"Barcode: {x}")); var d2 = tagSensor.ColorNoObservable.Subscribe(x => Log.LogWarning($"Color No: {x}")); - var d3 = tagSensor.RgbColorObservable.Subscribe(x => Log.LogWarning($"Color Rgb: {x.red}/{x.green}/{x.blue}")); await Task.Delay(20_000); d1.Dispose(); d2.Dispose(); - d3.Dispose(); await mario.SwitchOffAsync(); }