summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-02-27 12:19:05 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-02-27 12:19:05 +0100
commit1259de61e7b05ffef9f64bd478e96e3432c0d5a8 (patch)
treeb2a66c995f068ab2fc1caa671568d78231cf7d11
parent8df1d910e4701b80bf00d4da099d31315c326e4e (diff)
blinkenrocket.py / modem_transmit: Accept arbitrary number of text strings
-rw-r--r--utilities/blinkenrocket.py7
-rwxr-xr-xutilities/modem_transmit2
2 files changed, 5 insertions, 4 deletions
diff --git a/utilities/blinkenrocket.py b/utilities/blinkenrocket.py
index 00787fa..ea76ed8 100644
--- a/utilities/blinkenrocket.py
+++ b/utilities/blinkenrocket.py
@@ -25,6 +25,7 @@ class modem:
self.data = data
self.parity = parity
self.frequency = frequency if frequency in self.supportedFrequencies else 48000
+ self.cnt = 0
# Calculate Hamming parity for 12,8 code (12 bit of which 8bit data)
def hammingCalculateParity128(self, byte):
@@ -222,9 +223,9 @@ if __name__ == '__main__':
m = modem(parity=True, frequency=16000)
b = blinkenrocket()
- b.addFrame(textFrame("Test Foo eins zwei drei"))
- b.addFrame(textFrame("mrew? "))
- b.addFrame(textFrame("Und so weiter \x01 "))
+ for message in sys.argv[2:]:
+ b.addFrame(textFrame(message, speed=1))
+ b.addFrame(textFrame(" \x04 "))
b.addFrame(animationFrame(map(lambda x : chr(x), [0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255])))
#for i in xrange(10):
# b.addFrame(textFrame(str(100*i)))
diff --git a/utilities/modem_transmit b/utilities/modem_transmit
index 362bc4d..828911b 100755
--- a/utilities/modem_transmit
+++ b/utilities/modem_transmit
@@ -2,7 +2,7 @@
OUT="$(mktemp)"
-python blinkenrocket.py $OUT
+python blinkenrocket.py $OUT "$@"
case "$(uname -s)" in
Darwin)