From 36776bfbff6f15f7239924777651392945ebb2a0 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Thu, 27 Jul 2017 13:02:31 +0100 Subject: Rejig folder structure --- NucLedController/LEDTransition.cs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 NucLedController/LEDTransition.cs (limited to 'NucLedController/LEDTransition.cs') diff --git a/NucLedController/LEDTransition.cs b/NucLedController/LEDTransition.cs new file mode 100644 index 0000000..6f226ee --- /dev/null +++ b/NucLedController/LEDTransition.cs @@ -0,0 +1,35 @@ +using System.Collections.Immutable; + +namespace NucLedController +{ + sealed class LEDTransition + { + + public static readonly ImmutableList AvailableTransitions = ImmutableList.Create( + new LEDTransition("ALWAYS_ON", "Always on", 0x04), + new LEDTransition("BLINK_1_HZ", "Blink at 1hz", 0x01), + new LEDTransition("BLNIK_0.5_HZ", "Blink at 0.5hz", 0x05), + new LEDTransition("BLINK_0.25_HZ", "Blink at 0.25hz", 0x02), + new LEDTransition("FADE_1_HZ", "Fade at 1hz", 0x03), + new LEDTransition("FADE_0.5_HZ", "Fade at 0.5hz", 0x07), + new LEDTransition("FADE_0.25_HZ", "Fade at 0.25hz", 0x06) + ); + + public string Identifier { get; } + public string DisplayName { get; } + public byte ByteValue { get; } + + private LEDTransition(string identifier, string displayName, byte byteValue) + { + Identifier = identifier; + DisplayName = displayName; + ByteValue = byteValue; + } + + public override string ToString() + { + return this.Identifier + this.ByteValue; + } + + } +} -- cgit v1.2.3