Skip to content

Conversation

@peternewman
Copy link
Member

An initial version if you fancy giving it a first pass.

Still todo/future features:

  • Enable streaming mode
  • Populate panel IDs automatically
  • Populate streaming port automatically
  • Starting offset (each unit is only a max of 30 channels) and/or RDM patching (per controller or per panel)
  • Pass panel vector as part of SendDMX call, so we only need one Node
  • Work out if we need to bother with Rx/binding to the socket

@peternewman peternewman added this to the 0.11.0 milestone Dec 31, 2017
Nanoleaf Plugin
============

This plugin creates a device per IP, each with one output port. Each port
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a link to the product.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


uint16_t ip_port;
if (!StringToInt(m_preferences->GetValue(IPPortKey()), &ip_port)) {
ip_port = 60221;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this to a const kDefaultPort.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// Set device options
m_preferences->SetDefaultValue(PanelsKey(), StringValidator(), "");
m_preferences->SetDefaultValue(IPPortKey(), UIntValidator(1, 65535),
60221);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the const.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

ola::network::Interface m_interface;
std::auto_ptr<ola::network::UDPSocketInterface> m_socket;

NanoleafNode(const NanoleafNode&);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have a macro for these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was briefly confused, having just copied from KiNetNode.h, but yes, this must be DISALLOW_COPY_AND_ASSIGN, I'll fix it up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, along with other ones that had been missed over the years.

@peternewman peternewman requested a review from nomis52 January 6, 2018 15:52
@peternewman
Copy link
Member Author

This is ready for re-review @nomis52 . I guess it might make sense to merge this in, then I'll work on the other features later.

@peternewman peternewman requested review from nomis52 and removed request for nomis52 January 6, 2018 19:46
@peternewman peternewman merged commit b00d576 into OpenLightingProject:master Jan 13, 2018
@peternewman
Copy link
Member Author

Merging while failing, due to issues in base code fixed later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants