Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Micha
MarmeLEDv2
Commits
8efbab40
Commit
8efbab40
authored
Apr 23, 2017
by
Micha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up
parent
1cd9034d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
MarmeLED/animation.cs
MarmeLED/animation.cs
+0
-15
No files found.
MarmeLED/animation.cs
View file @
8efbab40
...
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment