From 2812a77fe2b46997616ccd793b030befd5413729 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 29 Jan 2016 20:45:10 +0100 Subject: re-add transmission demo code --- src/main.cc | 5 +++-- src/system.cc | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.cc b/src/main.cc index 91ff92a..765f1d9 100644 --- a/src/main.cc +++ b/src/main.cc @@ -10,11 +10,12 @@ #include "modem.h" #include "system.h" +animation_t ohai; + int main (void) { - animation_t ohai; ohai.mode = AnimationType::TEXT; - ohai.speed = (4 << 4) + 15; + ohai.speed = (2 << 4) + 15; ohai.data = (uint8_t *)"\001 Ohai "; ohai.length = 8; diff --git a/src/system.cc b/src/system.cc index fa039ce..774127d 100644 --- a/src/system.cc +++ b/src/system.cc @@ -12,6 +12,8 @@ System rocket; +extern animation_t ohai; + uint8_t disp_buf[128]; void System::loop() @@ -76,8 +78,10 @@ void System::loop() if (i == 127) { i = 0; } else if (modem_byte == 0) { + ohai.data = disp_buf; + ohai.length = i-1; + display.show(&ohai); i = 0; - //display.show(disp_buf); } } } -- cgit v1.2.3