Skip to content

Commit

Permalink
system: mark unused sections as reserved for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Apr 16, 2024
1 parent e460849 commit 9ad2c54
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions src/firmware/application/io/analog/Analog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ std::optional<uint8_t> 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:
Expand All @@ -438,9 +438,9 @@ std::optional<uint8_t> 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:
Expand Down
4 changes: 2 additions & 2 deletions src/firmware/application/io/encoders/Encoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ std::optional<uint8_t> 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;
}
Expand All @@ -480,7 +480,7 @@ std::optional<uint8_t> 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:
Expand Down
8 changes: 4 additions & 4 deletions src/firmware/application/system/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace sys
CHANNEL,
PULSES_PER_STEP,
ACCELERATION,
MIDI_ID_MSB,
RESERVED_1,
REMOTE_SYNC,
LOWER_LIMIT,
UPPER_LIMIT,
Expand All @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions src/firmware/application/system/Layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace sys
static_cast<uint16_t>(io::Encoders::type_t::AMOUNT) - 1,
},

// midi id section, lsb
// midi id section
{
io::Encoders::Collection::SIZE(),
0,
Expand Down Expand Up @@ -143,7 +143,7 @@ namespace sys
static_cast<uint16_t>(io::Encoders::acceleration_t::AMOUNT) - 1,
},

// midi id section, msb
// unused, reserved for compatibility
{
io::Encoders::Collection::SIZE(),
0,
Expand Down Expand Up @@ -201,42 +201,42 @@ namespace sys
static_cast<uint16_t>(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,
Expand Down

0 comments on commit 9ad2c54

Please sign in to comment.