4 Commits

Author SHA1 Message Date
b196f62111 Update Readme... 2024-01-18 18:16:50 +01:00
b085de2b39 Update Readme 2024-01-18 18:16:10 +01:00
ba8b76bfba Update Readme 2024-01-18 18:15:11 +01:00
0f62e9e9c9 Fix setup 2024-01-18 00:21:51 +01:00
2 changed files with 34 additions and 8 deletions

View File

@ -121,7 +121,7 @@ public static class Setup
"https://api.shocklink.net"); "https://api.shocklink.net");
string apiKey = QueryString("OpenShock API-Key:",""); string apiKey = QueryString("OpenShock API-Key:","");
Console.WriteLine("Shocker IDs associated with this API:"); Console.WriteLine("Shocker IDs associated with this API:");
List<string> shockerIds = GetShockerIds(c.Shockers); List<string> shockerIds = AddShockerIds();
IntensityRange intensityRange = GetIntensityRange(); IntensityRange intensityRange = GetIntensityRange();
DurationRange durationRange = GetDurationRange(); DurationRange durationRange = GetDurationRange();
@ -186,6 +186,24 @@ public static class Setup
return new DurationRange(min, max); return new DurationRange(min, max);
} }
private static List<string> AddShockerIds()
{
List<string> ids = new();
bool addAnother = true;
while (ids.Count < 1 || addAnother)
{
string id = QueryString("Shocker ID:", "");
while (id.Length < 1)
id = QueryString("Shocker ID:", "");
ids.Add(id);
Console.WriteLine("Add another ID? (Y/N):");
addAnother = Console.ReadKey().Key == ConsoleKey.Y;
}
return ids;
}
private static List<string> GetShockerIds(List<Shocker> shockers) private static List<string> GetShockerIds(List<Shocker> shockers)
{ {
List<string> allShockerIds = new(); List<string> allShockerIds = new();

View File

@ -43,26 +43,34 @@ Example `config.json`. Place next to executable. Will also be generated on first
} }
``` ```
### LogLevel
[Levels](https://learn.microsoft.com/de-de/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-8.0)
### ApiKey ### ApiKey
For OpenShock get token [here](https://shocklink.net/#/dashboard/tokens) For OpenShock (HTTP) get token [here](https://shocklink.net/#/dashboard/tokens)
### ApiType
CShocker [![Github](https://img.shields.io/badge/Github-8A2BE2)](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/Abstract/ShockerApi.cs)
### ShockerIds ### ShockerIds
List of Shocker-Ids, comma seperated. Get Id [here](https://shocklink.net/#/dashboard/shockers/own). Press the three dots -> Edit List of Shocker-Ids, comma seperated. Get ID of shocker [here](https://shocklink.net/#/dashboard/shockers/own). Press the three dots -> Edit
Example `[ "ID-1", "ID-2" ]` Example `[ "ID-1", "ID-2" ]`
### Intensity Range ### Intensity Range
`0-100`% `0-100`%
### Duration Range ### Duration Range
in ms in ms
### TriggerEvent IDs
From CS2GSI [![Github](https://img.shields.io/badge/Github-8A2BE2)](https://github.com/C9Glax/CS2GSI) [here](https://github.com/C9Glax/CS2GSI/blob/master/CS2GSI/CS2Event.cs)
### Values for `Actions` ### Values for `Actions`
- Beep From CShocker [![Github](https://img.shields.io/badge/Github-8A2BE2)](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/ControlAction.cs)
- Shock
- Vibrate ### ValueFromInput
- Nothing Use CS2GSI EventArgs value to determine Intensity (within configured Range)
# Using # Using
### CS2GSI ### CS2GSI