diff --git a/src/driver_everloop.cpp b/src/driver_everloop.cpp index 00c41ee..ac098a8 100644 --- a/src/driver_everloop.cpp +++ b/src/driver_everloop.cpp @@ -28,6 +28,13 @@ namespace matrix_malos { bool EverloopDriver::ProcessConfig(const pb::driver::DriverConfig& config) { pb::io::EverloopImage image(config.image()); + if (MatrixLeds() != image.led_size()) { + std::string error_msg("WARNING: Invalid number of Leds it must be ="); + error_msg += std::to_string(MatrixLeds()); + zmq_push_error_->Send(error_msg); + return false; + } + matrix_hal::EverloopImage image_for_hal(MatrixLeds()); int idx = 0; for (const pb::io::LedValue& value : image.led()) { diff --git a/src/malos.cpp b/src/malos.cpp index d560474..28c6ddb 100644 --- a/src/malos.cpp +++ b/src/malos.cpp @@ -47,7 +47,7 @@ int RunServer() { std::cerr << std::endl; matrix_hal::MatrixIOBus* bus = new matrix_hal::MatrixIOBus(); - + if (!bus->Init()) return false; DriverManager driver_manager(kBasePort, kUnsecureBindScope);