Skip to content

Commit

Permalink
Merge pull request #10 from rmmlr/develop
Browse files Browse the repository at this point in the history
Add parameter help
  • Loading branch information
rmmlr authored Oct 15, 2018
2 parents 1c6093e + 9a9b22c commit eea6089
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion HueCmd/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ static void Main(string[] args)
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(ex.Message);
Console.WriteLine();
Console.WriteLine();
Console.ResetColor();
Console.WriteLine();
PrintHelp();
Console.WriteLine();
Console.WriteLine();
Console.Write("Program is closing...");
Console.ReadKey();
}
Expand All @@ -78,7 +84,7 @@ static void Main(string[] args)
parameters.Add(parameter[0], parameter[1]);
}
}

//TODO: verify parameters

#endregion
Expand Down Expand Up @@ -157,5 +163,29 @@ static void Main(string[] args)
Console.ReadKey();
#endif
}

static void PrintHelp()
{
Console.WriteLine("Startparameters");
Console.WriteLine("");
Console.WriteLine("|Description |Name| Value |Light |Group |Scene |");
Console.WriteLine("|------------------|----|-----------|---------|---------|---------|");
Console.WriteLine("|Object* | | |light.hue|group.hue|scene.hue|");
Console.WriteLine("|ID* |id |0 - 254 |y |y |y |");
Console.WriteLine("|On state |on |0, 1 |y |y |n |");
Console.WriteLine("|Hue |hue |0 - 65535 |y |y |n |");
Console.WriteLine("|Saturation |sat |0 - 254 |y |y |n |");
Console.WriteLine("|Brightness |bri |0 - 254 |y |y |n |");
Console.WriteLine("|Color Temperature |ct |153 - 500 |y |y |n |");
Console.WriteLine("");
Console.WriteLine("*) required parameter - y) parameter allowed - n) parameter not allowed");
Console.WriteLine("");
Console.WriteLine("The program must be started with at least the required parameters, marked with *." +
"In addition, further allowed parameters (y) can be appended.");
Console.WriteLine("");
Console.WriteLine("Example");
Console.WriteLine("HueCmd.exe -light.hue id=1 on=1 bri=127");
Console.WriteLine("This means, switch on the light with id 1 and setup the brightness to a value of 127.");
}
}
}

0 comments on commit eea6089

Please sign in to comment.