summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-03-16 19:41:28 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-03-16 19:41:28 +0100
commita7552770f8d98f8993c56d592a59b9963eb6e51f (patch)
tree7cfa9a44bc59389c87a56f7e5799cb3b5d753967
parent9a85bff309dc6a3dba630e049d9846df2a81ff7d (diff)
more natural speed semantic (speed++ -> animation is faster)
-rw-r--r--src/static_patterns.h12
-rw-r--r--src/system.cc4
-rw-r--r--utilities/blinkenrocket.py4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/static_patterns.h b/src/static_patterns.h
index a8b026f..07fdb5e 100644
--- a/src/static_patterns.h
+++ b/src/static_patterns.h
@@ -19,7 +19,7 @@
const uint8_t PROGMEM shutdownPattern[] = {
0x20, 0x40,
- 0x01, 0x0f,
+ 0x0e, 0x0f,
0xff, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xff,
0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7e,
0x3c, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x3c,
@@ -32,7 +32,7 @@ const uint8_t PROGMEM shutdownPattern[] = {
const uint8_t PROGMEM flashingPattern[] = {
0x20, 0x10,
- 0x06, 0x00,
+ 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x33, 0x55, 0x98, 0x00, 0x00
};
@@ -40,7 +40,7 @@ const uint8_t PROGMEM flashingPattern[] = {
#ifdef LANG_DE
const uint8_t PROGMEM emptyPattern[] = {
0x10, 0x2d,
- 0x20, 0x00,
+ 0xc0, 0x00,
' ', 1, ' ', 'B', 'l', 'i', 'n', 'k', 'e', 'n', 'r', 'o', 'c', 'k', 'e',
't', ' ', 'v', '1', '.', '0', 'b', 'e', 't', 'a', ' ', '-', ' ', 'S', 'p',
'e', 'i', 'c', 'h', 'e', 'r', ' ', 'i', 's', 't', ' ', 'l', 'e', 'e', 'r'
@@ -48,7 +48,7 @@ const uint8_t PROGMEM emptyPattern[] = {
#else
const uint8_t PROGMEM emptyPattern[] = {
0x10, 0x2c,
- 0x20, 0x00,
+ 0xc0, 0x00,
' ', 1, ' ', 'B', 'l', 'i', 'n', 'k', 'e', 'n', 'r', 'o', 'c', 'k', 'e',
't', ' ', 'v', '1', '.', '0', 'b', 'e', 't', 'a', ' ', '-', ' ', 'S', 't',
'o', 'r', 'a', 'g', 'e', ' ', 'i', 's', ' ', 'e', 'm', 'p', 't', 'y'
@@ -58,14 +58,14 @@ const uint8_t PROGMEM emptyPattern[] = {
#ifdef LANG_DE
const uint8_t PROGMEM timeoutPattern[] = {
0x10, 0x16,
- 0x20, 0x00,
+ 0xc0, 0x00,
' ', 2, ' ', 'U', 'e', 'b', 'e', 'r', 't', 'r', 'a', 'g', 'u', 'n', 'g',
's', 'f', 'e', 'h', 'l', 'e', 'r'
};
#else
const uint8_t PROGMEM timeoutPattern[] = {
0x10, 0x15,
- 0x20, 0x00,
+ 0xc0, 0x00,
' ', 2, ' ', 'T', 'r', 'a', 'n', 's', 'm', 'i', 's', 's', 'i', 'o', 'n',
' ', 'e', 'r', 'r', 'o', 'r'
};
diff --git a/src/system.cc b/src/system.cc
index e0765c2..9e36c0a 100644
--- a/src/system.cc
+++ b/src/system.cc
@@ -82,11 +82,11 @@ void System::loadPattern_buf(uint8_t *pattern)
active_anim.length += pattern[1];
if (active_anim.type == AnimationType::TEXT) {
- active_anim.speed = (pattern[2] & 0xf0) + 15;
+ active_anim.speed = 250 - (pattern[2] & 0xf0);
active_anim.delay = (pattern[2] & 0x0f ) << 4;
active_anim.direction = pattern[3] >> 4;
} else if (active_anim.type == AnimationType::FRAMES) {
- active_anim.speed = ((pattern[2] & 0x0f) << 4) + 15;
+ active_anim.speed = 250 - ((pattern[2] & 0x0f) << 4);
active_anim.delay = (pattern[3] & 0x0f) << 2;
active_anim.direction = 0;
}
diff --git a/utilities/blinkenrocket.py b/utilities/blinkenrocket.py
index 9671fbe..dd229b9 100644
--- a/utilities/blinkenrocket.py
+++ b/utilities/blinkenrocket.py
@@ -122,7 +122,7 @@ class textFrame(Frame):
# identifier as of message specification: 0001
identifier = 0x01
- def __init__(self,text,speed=1,delay=0,direction=0):
+ def __init__(self,text,speed=13,delay=0,direction=0):
self.text = text
self.setSpeed(speed)
self.setDelay(delay)
@@ -159,7 +159,7 @@ class animationFrame(Frame):
# identifier as per specification: 0010
identifier = 0x02
- def __init__(self,animation,speed=1,delay=0):
+ def __init__(self,animation,speed=13,delay=0):
self.setAnimation(animation)
self.setSpeed(speed)
self.setDelay(delay)