Esempio n. 1
0
        public static void GetTemperature(LEDStrahler Strahler)
        {
            string Ret = LEDStrahlerSerial.WriteRead("G" + (int)Commands.GetTemperature + " " + Strahler.UUID, 200);

            if ((Ret.Length >= 6) && (Ret.StartsWith("T: ") == true) && (double.TryParse(Ret.Substring(3), NumberStyles.Number, CultureInfo.InvariantCulture, out double Temp) == true))
            {
                Strahler.Temperature = Temp;
            }
            else
            {
                Strahler.Temperature = 0.0;
            }
        }
Esempio n. 2
0
 public static void FadeValue(LEDStrahler Strahler, ushort Period, ushort Hue, ushort Saturation, ushort ValueMin, ushort ValueMax)
 {
     LEDStrahlerSerial.Write("G" + (int)Commands.FadeValue + " 0 " + Period + " " + Hue + " " + Saturation + " " + ValueMax + " " + ValueMin + " " + Strahler.UUID);
 }
Esempio n. 3
0
 public static void StrobeHSV(LEDStrahler Strahler, byte Period, byte Count, ushort Hue, ushort Saturation, ushort Value)
 {
     LEDStrahlerSerial.Write("G" + (int)Commands.StrobeHSV + " 0 " + Period + " " + Count + " " + Hue + " " + Saturation + " " + Value + " " + Strahler.UUID);
 }
Esempio n. 4
0
 public static void StrobeRGBW(LEDStrahler Strahler, byte Period, byte Count, ushort Red, ushort Green, ushort Blue, ushort White)
 {
     LEDStrahlerSerial.Write("G" + (int)Commands.StrobeRGBW + " 0 " + Period + " " + Count + " " + Red + " " + Green + " " + Blue + " " + White + " " + Strahler.UUID);
 }
Esempio n. 5
0
 public static void SetHSV(LEDStrahler Strahler, ushort Hue, ushort Saturation, ushort Value)
 {
     LEDStrahlerSerial.Write("G" + (int)Commands.SetHSV + " 0 " + Hue + " " + Saturation + " " + Value + " " + Strahler.UUID);
 }
Esempio n. 6
0
 public static void SetRGBW(LEDStrahler Strahler, ushort Red, ushort Green, ushort Blue, ushort White)
 {
     LEDStrahlerSerial.Write("G" + (int)Commands.SetRGBW + " 0 " + Red + " " + Green + " " + Blue + " " + White + " " + Strahler.UUID);
 }