From 7494737f7ed0d793c0adaf4120eba08c60681c88 Mon Sep 17 00:00:00 2001 From: Juan Pablo Pino Bravo Date: Mon, 7 Sep 2026 14:30:44 +0200 Subject: [PATCH] Add MultibeamColorFilter and Set/GetMultibeamColorFilter requests The app sends the color filter used to render the multibeam sonar fan as a 768-byte lookup table (256 R,G,B triplets indexed by echo intensity). The drone keeps the last one received and applies it to the sonar RTSP stream; grayscale is used until one is set. --- protobuf_definitions/message_formats.proto | 9 +++++++++ protobuf_definitions/req_rep.proto | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/protobuf_definitions/message_formats.proto b/protobuf_definitions/message_formats.proto index c7f1924b..3d1883b8 100644 --- a/protobuf_definitions/message_formats.proto +++ b/protobuf_definitions/message_formats.proto @@ -1553,6 +1553,15 @@ message MultibeamDiscovery { MultibeamErrorFlags error_flags = 8; // Error flags specific for the connected multibeam device. } +// Color filter used to render the multibeam sonar fan. +// +// The fan renderer maps each echo intensity (0..255) to a color through this +// lookup table. The drone keeps the last filter received in memory and applies +// it to the sonar RTSP stream; grayscale is used until one is set. +message MultibeamColorFilter { + bytes rgb = 1; // 768 bytes: 256 consecutive R,G,B triplets, indexed by echo intensity. +} + // Error flags for multibeam sonar devices. message MultibeamErrorFlags { /* diff --git a/protobuf_definitions/req_rep.proto b/protobuf_definitions/req_rep.proto index d167c2dd..796735eb 100644 --- a/protobuf_definitions/req_rep.proto +++ b/protobuf_definitions/req_rep.proto @@ -275,3 +275,21 @@ message GetCvModelsReq { message GetCvModelsRep { repeated CvModelInfo cv_models = 1; // All installed models, including models that are not running. } + +// Request to set the color filter used to render the multibeam sonar fan. +message SetMultibeamColorFilterReq { + MultibeamColorFilter color_filter = 1; // The color filter to apply. +} + +// Response after setting the multibeam color filter. +message SetMultibeamColorFilterRep { +} + +// Request to get the color filter currently used to render the multibeam sonar fan. +message GetMultibeamColorFilterReq { +} + +// Response with the current multibeam color filter. +message GetMultibeamColorFilterRep { + MultibeamColorFilter color_filter = 1; // The current color filter. Empty rgb means none is set (grayscale). +}