From 4e79f40e80edd01e7ae384912ea766deb743462b Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 11 Feb 2024 22:58:53 +0100 Subject: [PATCH] Update Readme --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b298160..897ea1d 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,9 @@ Library to interact with Shock-Collars that are remotely controllable via ESP32- ```csharp public static void Main(string[] args){ - IntensityRange intensityRange = new IntensityRange(30, 50); - DurationRange durationRange = new DurationRange(1000, 2000); string apiKey = ":)"; - OpenShockHttp openShockHttp = new (intensityRange, durationRange, apiKey); + OpenShockHttp openShockHttp = new (apiKey); OpenShockShocker shocker1 = openShockHttp.GetShockers().First(); shocker1.Control(ControlAction.Vibrate, 20, 1000); @@ -19,7 +17,7 @@ public static void Main(string[] args){ List serialPorts = SerialHelper.GetSerialPorts(); int selectedPort = 1; - OpenShockSerial openShockSerial = new(intensityRange, durationRange, serialPorts[selectedPort], apiKey); + OpenShockSerial openShockSerial = new(serialPorts[selectedPort], apiKey); OpenShockShocker shocker2 = openShockSerial.GetShockers().First(); shocker2.Control(ControlAction.Vibrate, 20, 1000); @@ -28,10 +26,8 @@ public static void Main(string[] args){ ``` ## `Shocker.Control` ```csharp -Control(ControlAction action, int? intensity = null, int? duration = null) +Control(ControlAction action, int intensity, int duration) ``` -If `intensity` or `duration` are `null`, a random value within the -configured range will be used. ### ControlAction