Skip to content

Commit

Permalink
Fix OLA output compile/link
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jul 30, 2019
1 parent 088de27 commit 071ad04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/channeloutput/OLAOutput.cpp
Expand Up @@ -31,6 +31,13 @@

#include <ola/Logging.h>

extern "C" {
OLAOutput *createOLAOutput(unsigned int startChannel,
unsigned int channelCount) {
return new OLAOutput(startChannel, channelCount);
}
}

/*
*
*/
Expand Down Expand Up @@ -96,7 +103,16 @@ int OLAOutput::Close(void)

return ThreadedChannelOutputBase::Close();
}

void OLAOutput::GetRequiredChannelRange(int &min, int & max) {
min = FPPD_MAX_CHANNELS;
max = 0;
for (int universe = 0 ; universe < m_universes.size(); universe++) {
Universe u = m_universes[universe];

min = std::min(min, u.startChannel);
max = std::max(max, u.startChannel + u.channelCount);
}
}
/*
*
*/
Expand Down
2 changes: 2 additions & 0 deletions src/channeloutput/OLAOutput.h
Expand Up @@ -45,6 +45,8 @@ class OLAOutput : public ThreadedChannelOutputBase {
int RawSendData(unsigned char *channelData);

void DumpConfig(void);

virtual void GetRequiredChannelRange(int &min, int & max);

private:
ola::DmxBuffer m_buffer;
Expand Down

0 comments on commit 071ad04

Please sign in to comment.