diff --git a/common/core/CMakeLists.txt b/common/core/CMakeLists.txt index 4d5579570..2cb65af42 100644 --- a/common/core/CMakeLists.txt +++ b/common/core/CMakeLists.txt @@ -55,7 +55,7 @@ function(add_revision) string(SUBSTRING ${_ar_REVISION} 0 1 PRIMARY_REVISION) string(SUBSTRING ${_ar_REVISION} 1 1 SECONDARY_REVISION) if (${USE_PRESSURE_MOVE}) - set(TERTIARY_FLAG "0x01") + set(TERTIARY_FLAG "'1'") else() set(TERTIARY_FLAG "0x00") endif() diff --git a/gantry/core/can_task.cpp b/gantry/core/can_task.cpp index d9fe6e874..65f47e0ac 100644 --- a/gantry/core/can_task.cpp +++ b/gantry/core/can_task.cpp @@ -52,7 +52,8 @@ static auto system_message_handler = std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), revision_get()->primary, - revision_get()->secondary}; + revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary)}; static auto system_dispatch_target = can_task::SystemDispatchTarget{system_message_handler}; diff --git a/gripper/core/can_tasks.cpp b/gripper/core/can_tasks.cpp index 82fdd0578..553a99b38 100644 --- a/gripper/core/can_tasks.cpp +++ b/gripper/core/can_tasks.cpp @@ -38,7 +38,8 @@ static auto system_message_handler = std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), revision_get()->primary, - revision_get()->secondary}; + revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary)}; static auto system_dispatch_target = can_task::SystemDispatchTarget{system_message_handler}; diff --git a/head/core/can_task.cpp b/head/core/can_task.cpp index 32f4e0de6..dcb1f3359 100644 --- a/head/core/can_task.cpp +++ b/head/core/can_task.cpp @@ -80,7 +80,8 @@ static auto system_message_handler = common_queues, version_get()->version, version_get()->flags, std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), - revision_get()->primary, revision_get()->secondary); + revision_get()->primary, revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary)); static auto system_dispatch_target = SystemDispatchTarget{system_message_handler}; diff --git a/hepa-uv/core/can_tasks.cpp b/hepa-uv/core/can_tasks.cpp index e09e16ceb..c3d6969ae 100644 --- a/hepa-uv/core/can_tasks.cpp +++ b/hepa-uv/core/can_tasks.cpp @@ -29,7 +29,8 @@ static auto system_message_handler = std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), revision_get()->primary, - revision_get()->secondary}; + revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary)}; static auto system_dispatch_target = can_task::SystemDispatchTarget{system_message_handler}; diff --git a/include/can/core/message_handlers/system.hpp b/include/can/core/message_handlers/system.hpp index abdfe0c09..a1ff8bc60 100644 --- a/include/can/core/message_handlers/system.hpp +++ b/include/can/core/message_handlers/system.hpp @@ -29,6 +29,7 @@ class SystemMessageHandler { SystemMessageHandler(CanClient &writer, uint32_t version, uint32_t flags, std::span version_sha, char primary_revision, char secondary_revision, + std::array tertiary_revision, uint8_t device_subid = 0) : writer(writer), response{.version = version, @@ -39,6 +40,10 @@ class SystemMessageHandler { std::copy_n(version_sha.begin(), std::min(version_sha.size(), response.shortsha.size()), response.shortsha.begin()); + std::copy_n(tertiary_revision.begin(), + std::min(tertiary_revision.size(), + response.tertiary_revision.size()), + response.tertiary_revision.begin()); } SystemMessageHandler(const SystemMessageHandler &) = delete; SystemMessageHandler(const SystemMessageHandler &&) = delete; diff --git a/pipettes/core/can_task_high_throughput.cpp b/pipettes/core/can_task_high_throughput.cpp index 266b0feb1..e9200f8dd 100644 --- a/pipettes/core/can_task_high_throughput.cpp +++ b/pipettes/core/can_task_high_throughput.cpp @@ -51,6 +51,7 @@ static auto system_message_handler = std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), revision_get()->primary, revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary), // this is the high-throughput path so we can only be a 96 static_cast(can::ids::PipetteType::pipette_96)}; diff --git a/pipettes/core/can_task_low_throughput.cpp b/pipettes/core/can_task_low_throughput.cpp index 4f0885b0b..7ad0254db 100644 --- a/pipettes/core/can_task_low_throughput.cpp +++ b/pipettes/core/can_task_low_throughput.cpp @@ -34,6 +34,7 @@ static auto system_message_handler = std::span(std::cbegin(version_get()->sha), std::cend(version_get()->sha)), revision_get()->primary, revision_get()->secondary, + reinterpret_cast&>(revision_get()->tertiary), // in low throughput, we can be either single or multi (8-chan) static_cast(get_pipette_type() == PipetteType::SINGLE_CHANNEL ? can::ids::PipetteType::pipette_single