From e3d6416ff34c1c9dd4bb4172a04c9e6337e0b92b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 18 Oct 2026 11:16:24 +0200 Subject: [PATCH] broker rugnux live: the scan result carries rugnux's rotation lattice The receiver's own rotation indexer sees no image in a rugnux-live collection, so the scan result the broker serves (/result/scan) went without the rotation lattice, cell and Bravais symbol. They are now taken from rugnux's end message, as the end message itself already does. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4 --- receiver/JFJochReceiverRugnux.cpp | 10 ++++++++++ receiver/JFJochReceiverRugnux.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/receiver/JFJochReceiverRugnux.cpp b/receiver/JFJochReceiverRugnux.cpp index 35a7b22a9..17b707d42 100644 --- a/receiver/JFJochReceiverRugnux.cpp +++ b/receiver/JFJochReceiverRugnux.cpp @@ -557,6 +557,16 @@ float JFJochReceiverRugnux::GetEfficiency() const { JFJochReceiverOutput JFJochReceiverRugnux::GetFinalStatistics() const { JFJochReceiverOutput ret = JFJochReceiver::GetFinalStatistics(); ret.analysis_warning = skipped_warning; + // The receiver's own rotation indexer sees no image here: the lattice is rugnux's. + std::unique_lock ul(rugnux_m); + if (rugnux_result) { + const EndMessage &r = rugnux_result->end_message; + ret.scan_result.rotation_lattice = r.rotation_lattice; + if (r.rotation_lattice_type) { + ret.scan_result.rotation_crystal_system = r.rotation_lattice_type->crystal_system; + ret.scan_result.rotation_centering = r.rotation_lattice_type->centering; + } + } return ret; } diff --git a/receiver/JFJochReceiverRugnux.h b/receiver/JFJochReceiverRugnux.h index 9ee16d2c1..74281555a 100644 --- a/receiver/JFJochReceiverRugnux.h +++ b/receiver/JFJochReceiverRugnux.h @@ -40,7 +40,7 @@ class JFJochReceiverRugnux : public JFJochReceiver { std::latch measurement_started; std::latch forward_started; - std::mutex rugnux_m; + mutable std::mutex rugnux_m; Rugnux *rugnux = nullptr; // while it runs, for Cut Rugnux *probe = nullptr; // the same for the lattice probe std::optional rugnux_result;