Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ COMMON_TESTING_PROTOBUF_FLAGS = $(COMMON_TESTING_FLAGS)
# disable fatal warnings on WIN32.
if ! USING_WIN32
if FATAL_WARNINGS
COMMON_CXXFLAGS += -Werror
COMMON_CXXFLAGS += -Werror -Wno-error=vla
COMMON_PROTOBUF_CXXFLAGS += -Werror -Wno-error=unused-parameter \
-Wno-error=deprecated-declarations \
-Wno-error=sign-compare \
-Wno-error=ignored-qualifiers
COMMON_TESTING_FLAGS += -Werror
COMMON_TESTING_FLAGS += -Werror -Wno-error=vla
COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter \
-Wno-error=deprecated-declarations

Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ x/y/2024 ola-0.10.10
std::auto_ptr #1028 Debian #831103
* JsonPatchParser.h tries to include a project header file; move the
OptionalItem header to includes to resolve #1086
* Reset the client socket once we've closed it, so it can be re-used
* Reset the client socket once we've closed it, so it can be reused
* Silence a warning in the code so it builds with Protobuf 3 #1110 Debian
#835433
* Work around <ernno.h> include failure on MIPS Debian #836383
Expand Down
2 changes: 1 addition & 1 deletion javascript/ola/full/rdm_patcher_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ola.RDMPatcherTab.prototype.updateUidList_ = function(e) {
return;
}

// It would be really nice to re-used the old values so we didn't have to
// It would be really nice to reuse the old values so we didn't have to
// re-fetch everything but until we have some notification mechanism we can't
// risk caching stale data.
this.pending_devices = new Array();
Expand Down
32 changes: 16 additions & 16 deletions plugins/nanoleaf/NanoleafDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ namespace nanoleaf {

class NanoleafDevice: public ola::Device {
public:
NanoleafDevice(AbstractPlugin *owner,
class Preferences *preferences,
class PluginAdaptor *plugin_adaptor,
const ola::network::IPV4Address &controller);
NanoleafDevice(AbstractPlugin *owner,
class Preferences *preferences,
class PluginAdaptor *plugin_adaptor,
const ola::network::IPV4Address &controller);

std::string DeviceId() const;
std::string DeviceId() const;

protected:
bool StartHook();
void PrePortStop();
void PostPortStop();
bool StartHook();
void PrePortStop();
void PostPortStop();

private:
class NanoleafNode *m_node;
class Preferences *m_preferences;
class PluginAdaptor *m_plugin_adaptor;
const ola::network::IPV4Address m_controller;
class NanoleafNode *m_node;
class Preferences *m_preferences;
class PluginAdaptor *m_plugin_adaptor;
const ola::network::IPV4Address m_controller;

void SetDefaults();
std::string IPPortKey() const;
std::string PanelsKey() const;
void SetDefaults();
std::string IPPortKey() const;
std::string PanelsKey() const;

static const uint16_t DEFAULT_STREAMING_PORT = 60221;
static const uint16_t DEFAULT_STREAMING_PORT = 60221;
};
} // namespace nanoleaf
} // namespace plugin
Expand Down
46 changes: 23 additions & 23 deletions plugins/nanoleaf/NanoleafNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,36 @@ namespace nanoleaf {

class NanoleafNode {
public:
NanoleafNode(ola::io::SelectServerInterface *ss,
std::vector<uint8_t> panels,
ola::network::UDPSocketInterface *socket = NULL);
virtual ~NanoleafNode();
NanoleafNode(ola::io::SelectServerInterface *ss,
std::vector<uint8_t> panels,
ola::network::UDPSocketInterface *socket = NULL);
virtual ~NanoleafNode();

bool Start();
bool Stop();
bool Start();
bool Stop();

// The following apply to Input Ports (those which send data)
bool SendDMX(const ola::network::IPV4SocketAddress &target,
const ola::DmxBuffer &buffer);
// The following apply to Input Ports (those which send data)
bool SendDMX(const ola::network::IPV4SocketAddress &target,
const ola::DmxBuffer &buffer);

private:
bool m_running;
ola::io::SelectServerInterface *m_ss;
std::vector<uint8_t> m_panels;
ola::io::IOQueue m_output_queue;
ola::io::OutputStream m_output_stream;
ola::network::Interface m_interface;
std::auto_ptr<ola::network::UDPSocketInterface> m_socket;
bool m_running;
ola::io::SelectServerInterface *m_ss;
std::vector<uint8_t> m_panels;
ola::io::IOQueue m_output_queue;
ola::io::OutputStream m_output_stream;
ola::network::Interface m_interface;
std::auto_ptr<ola::network::UDPSocketInterface> m_socket;

void SocketReady();
bool InitNetwork();
void SocketReady();
bool InitNetwork();

static const uint8_t NANOLEAF_FRAME_COUNT = 0x01;
static const uint8_t NANOLEAF_WHITE_LEVEL = 0x00;
static const uint8_t NANOLEAF_TRANSITION_TIME = 0x01;
static const uint8_t NANOLEAF_SLOTS_PER_PANEL = 3;
static const uint8_t NANOLEAF_FRAME_COUNT = 0x01;
static const uint8_t NANOLEAF_WHITE_LEVEL = 0x00;
static const uint8_t NANOLEAF_TRANSITION_TIME = 0x01;
static const uint8_t NANOLEAF_SLOTS_PER_PANEL = 3;

DISALLOW_COPY_AND_ASSIGN(NanoleafNode);
DISALLOW_COPY_AND_ASSIGN(NanoleafNode);
};
} // namespace nanoleaf
} // namespace plugin
Expand Down
26 changes: 13 additions & 13 deletions plugins/nanoleaf/NanoleafPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ namespace nanoleaf {

class NanoleafPlugin : public Plugin {
public:
explicit NanoleafPlugin(PluginAdaptor *plugin_adaptor);
~NanoleafPlugin();
explicit NanoleafPlugin(PluginAdaptor *plugin_adaptor);
~NanoleafPlugin();

std::string Name() const { return PLUGIN_NAME; }
ola_plugin_id Id() const { return OLA_PLUGIN_NANOLEAF; }
std::string Description() const;
std::string PluginPrefix() const { return PLUGIN_PREFIX; }
std::string Name() const { return PLUGIN_NAME; }
ola_plugin_id Id() const { return OLA_PLUGIN_NANOLEAF; }
std::string Description() const;
std::string PluginPrefix() const { return PLUGIN_PREFIX; }

private:
std::vector<class NanoleafDevice*> m_devices;
std::vector<class NanoleafDevice*> m_devices;

bool StartHook();
bool StopHook();
bool SetDefaultPreferences();
bool StartHook();
bool StopHook();
bool SetDefaultPreferences();

static const char PLUGIN_NAME[];
static const char PLUGIN_PREFIX[];
static const char CONTROLLER_KEY[];
static const char PLUGIN_NAME[];
static const char PLUGIN_PREFIX[];
static const char CONTROLLER_KEY[];
};
} // namespace nanoleaf
} // namespace plugin
Expand Down
5 changes: 3 additions & 2 deletions plugins/spidmx/SPIDMXWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ bool SPIDMXWidget::ReadWrite(uint8_t *tx_buf, uint8_t *rx_buf,
struct spi_ioc_transfer tr;
memset(&tr, 0, sizeof(spi_ioc_transfer));

tr.tx_buf = (uint64_t) tx_buf;
tr.rx_buf = (uint64_t) rx_buf;
// Changing these to a static_cast breaks the tests at least
tr.tx_buf = (uint64_t) tx_buf; // NOLINT(readability/casting)
tr.rx_buf = (uint64_t) rx_buf; // NOLINT(readability/casting)
Comment on lines +103 to +105
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think a static_cast should even compile here; the C cast will behave like a reinterpret_cast in this case (but is more permissive). I think best would be to do an explicit reinterpret_cast:

Suggested change
// Changing these to a static_cast breaks the tests at least
tr.tx_buf = (uint64_t) tx_buf; // NOLINT(readability/casting)
tr.rx_buf = (uint64_t) rx_buf; // NOLINT(readability/casting)
tr.tx_buf = reinterpret_cast<uint64_t>(tx_buf);
tr.rx_buf = reinterpret_cast<uint64_t>(rx_buf);

tr.len = blocklength;
tr.speed_hz = SPI_SPEED;
tr.delay_usecs = SPI_DELAY;
Expand Down
2 changes: 1 addition & 1 deletion tools/e133/DeviceManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ using std::vector;

/**
* This class is responsible for maintaining connections to E1.33 devices.
* TODO(simon): Some of this code can be re-used for the controller side. See
* TODO(simon): Some of this code can be reused for the controller side. See
* if we can factor it out.
*/
class DeviceManagerImpl {
Expand Down
Loading