Skip to content
Snippets Groups Projects
Commit e5a3b4c0 authored by ftomi's avatar ftomi
Browse files

Update universes

parent f504c872
Branches
No related tags found
No related merge requests found
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
#include <ola/client/ClientWrapper.h> #include <ola/client/ClientWrapper.h>
#include "spisender.h" #include "spisender.h"
// Important to go from zero. // Important to go from one.
// Else modify the NewDmx callback // Else modify the NewDmx callback
static unsigned int universes[6] = {0, 1, 2, 3, 4, 5}; static unsigned int universes[6] = {1, 2, 3, 4, 5, 6};
// The 'n'th universe goes from (rows[n]) to (rows[n+1]-1) inclusive // The 'n'th universe (n: 1-6) goes from (rows[n-1]) to (rows[n]-1) inclusive
static int universe_rows[7] = {0, 5, 10, 15, 20, 25, 26}; static int universe_rows[7] = {0, 5, 10, 15, 20, 25, 26};
static void RegisterComplete(const ola::client::Result &result); static void RegisterComplete(const ola::client::Result &result);
...@@ -64,10 +64,8 @@ static void NewDmx(const ola::client::DMXMetadata &metadata, ...@@ -64,10 +64,8 @@ static void NewDmx(const ola::client::DMXMetadata &metadata,
const ola::DmxBuffer &data) const ola::DmxBuffer &data)
{ {
MxFrame frame; MxFrame frame;
if (metadata.universe > 5) return; int startY = universe_rows[metadata.universe-1];
//printf("New Frame on universe %d\n", metadata.universe); int endY = universe_rows[metadata.universe]-1;
int startY = universe_rows[metadata.universe];
int endY = universe_rows[metadata.universe+1]-1;
const uint8_t* arr = data.GetRaw(); const uint8_t* arr = data.GetRaw();
int k = 0; int k = 0;
for (size_t y = startY; y <= endY; y++) for (size_t y = startY; y <= endY; y++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment