From dcc48700183226b1ce98c539d842dc4c3f7df968 Mon Sep 17 00:00:00 2001 From: paradajz <2544094+paradajz@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:37:43 +0200 Subject: [PATCH] system: mark unused sections as reserved for clarity --- src/firmware/application/io/analog/Analog.cpp | 12 ++++++------ .../application/io/encoders/Encoders.cpp | 4 ++-- src/firmware/application/system/Config.h | 8 ++++---- src/firmware/application/system/Layout.h | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/firmware/application/io/analog/Analog.cpp b/src/firmware/application/io/analog/Analog.cpp index 7e331f13a..81576870b 100644 --- a/src/firmware/application/io/analog/Analog.cpp +++ b/src/firmware/application/io/analog/Analog.cpp @@ -420,9 +420,9 @@ std::optional Analog::sysConfigGet(sys::Config::Section::analog_t secti switch (section) { - case sys::Config::Section::analog_t::MIDI_ID_MSB: - case sys::Config::Section::analog_t::LOWER_LIMIT_MSB: - case sys::Config::Section::analog_t::UPPER_LIMIT_MSB: + case sys::Config::Section::analog_t::RESERVED_1: + case sys::Config::Section::analog_t::RESERVED_2: + case sys::Config::Section::analog_t::RESERVED_3: return sys::Config::status_t::ERROR_NOT_SUPPORTED; default: @@ -438,9 +438,9 @@ std::optional Analog::sysConfigSet(sys::Config::Section::analog_t secti { switch (section) { - case sys::Config::Section::analog_t::MIDI_ID_MSB: - case sys::Config::Section::analog_t::LOWER_LIMIT_MSB: - case sys::Config::Section::analog_t::UPPER_LIMIT_MSB: + case sys::Config::Section::analog_t::RESERVED_1: + case sys::Config::Section::analog_t::RESERVED_2: + case sys::Config::Section::analog_t::RESERVED_3: return sys::Config::status_t::ERROR_NOT_SUPPORTED; case sys::Config::Section::analog_t::TYPE: diff --git a/src/firmware/application/io/encoders/Encoders.cpp b/src/firmware/application/io/encoders/Encoders.cpp index b38c194ef..fcd401e08 100644 --- a/src/firmware/application/io/encoders/Encoders.cpp +++ b/src/firmware/application/io/encoders/Encoders.cpp @@ -465,7 +465,7 @@ std::optional Encoders::sysConfigGet(sys::Config::Section::encoder_t se if (result == sys::Config::status_t::ACK) { - if (section == sys::Config::Section::encoder_t::MIDI_ID_MSB) + if (section == sys::Config::Section::encoder_t::RESERVED_1) { return sys::Config::status_t::ERROR_NOT_SUPPORTED; } @@ -480,7 +480,7 @@ std::optional Encoders::sysConfigSet(sys::Config::Section::encoder_t se { switch (section) { - case sys::Config::Section::encoder_t::MIDI_ID_MSB: + case sys::Config::Section::encoder_t::RESERVED_1: return sys::Config::status_t::ERROR_NOT_SUPPORTED; default: diff --git a/src/firmware/application/system/Config.h b/src/firmware/application/system/Config.h index 532f8c913..132f9fd10 100644 --- a/src/firmware/application/system/Config.h +++ b/src/firmware/application/system/Config.h @@ -80,7 +80,7 @@ namespace sys CHANNEL, PULSES_PER_STEP, ACCELERATION, - MIDI_ID_MSB, + RESERVED_1, REMOTE_SYNC, LOWER_LIMIT, UPPER_LIMIT, @@ -94,11 +94,11 @@ namespace sys INVERT, TYPE, MIDI_ID, - MIDI_ID_MSB, + RESERVED_1, LOWER_LIMIT, - LOWER_LIMIT_MSB, + RESERVED_2, UPPER_LIMIT, - UPPER_LIMIT_MSB, + RESERVED_3, CHANNEL, LOWER_OFFSET, UPPER_OFFSET, diff --git a/src/firmware/application/system/Layout.h b/src/firmware/application/system/Layout.h index 6942abce5..d7d999b4e 100644 --- a/src/firmware/application/system/Layout.h +++ b/src/firmware/application/system/Layout.h @@ -115,7 +115,7 @@ namespace sys static_cast(io::Encoders::type_t::AMOUNT) - 1, }, - // midi id section, lsb + // midi id section { io::Encoders::Collection::SIZE(), 0, @@ -143,7 +143,7 @@ namespace sys static_cast(io::Encoders::acceleration_t::AMOUNT) - 1, }, - // midi id section, msb + // unused, reserved for compatibility { io::Encoders::Collection::SIZE(), 0, @@ -201,42 +201,42 @@ namespace sys static_cast(io::Analog::type_t::AMOUNT) - 1, }, - // midi id section, lsb + // midi id section { io::Analog::Collection::SIZE(), 0, 16383, }, - // midi id section, msb + // unused, reserved for compatibility { io::Analog::Collection::SIZE(), 0, 127, }, - // lower value limit section, lsb + // lower value limit section { io::Analog::Collection::SIZE(), 0, 16383, }, - // lower value limit section, msb + // unused, reserved for compatibility { io::Analog::Collection::SIZE(), 0, 127, }, - // upper value limit section, lsb + // upper value limit section { io::Analog::Collection::SIZE(), 0, 16383, }, - // upper value limit section, msb + // unused, reserved for compatibility { io::Analog::Collection::SIZE(), 0,