Commit 8efbab40 authored by Micha's avatar Micha

cleaned up

parent 1cd9034d
......@@ -10,7 +10,6 @@ namespace MarmeLED
{
public abstract class animation
{
//public int numberIterations { get; set; }
public MarmeLED_v2 marmeLED { get; set; }
public abstract void Start();
public abstract void Run();
......@@ -35,7 +34,6 @@ namespace MarmeLED
private byte base_red, base_green, base_blue;
public waveLight(byte red, byte green, byte blue)
//: base(marmeLed)
{
base_red = red;
base_blue = blue;
......@@ -49,8 +47,6 @@ namespace MarmeLED
{
for (int i = 0; i < glassesAmount; i++)
{
//values.Add((int)(255 * Math.Sin(Math.PI / glassesAmount * i)));
// scale given color
values_red.Add((int)(base_red * Math.Sin(Math.PI / glassesAmount * i)));
values_green.Add((int)(base_green * Math.Sin(Math.PI / glassesAmount * i)));
values_blue.Add((int)(base_blue * Math.Sin(Math.PI / glassesAmount * i)));
......@@ -78,13 +74,9 @@ namespace MarmeLED
private void rollOne(ref List<int> vals)
{
// get last element index
int lastIndex = vals.Count - 1;
// get last element
int last = vals[lastIndex];
// remove last element
vals.RemoveAt(lastIndex);
// add last element to front
vals.Insert(0, last);
}
}
......@@ -96,7 +88,6 @@ namespace MarmeLED
private List<int> values_blue;
private byte base_red, base_green, base_blue;
public rotate(byte red, byte green, byte blue)
//: base(marmeLed)
{
base_red = red;
base_blue = blue;
......@@ -110,8 +101,6 @@ namespace MarmeLED
{
for (int i = 0; i < ledsAmount; i++)
{
//values.Add((int)(255 * Math.Sin(Math.PI / glassesAmount * i)));
// scale given color
values_red.Add((int)(base_red * Math.Sin(Math.PI / ledsAmount * i)));
values_green.Add((int)(base_green * Math.Sin(Math.PI / ledsAmount * i)));
values_blue.Add((int)(base_blue * Math.Sin(Math.PI / ledsAmount * i)));
......@@ -141,13 +130,9 @@ namespace MarmeLED
private void rollOne(ref List<int> vals)
{
// get last element index
int lastIndex = vals.Count - 1;
// get last element
int last = vals[lastIndex];
// remove last element
vals.RemoveAt(lastIndex);
// add last element to front
vals.Insert(0, last);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment