From b837c11840b6e9160ab81487e3848b0734138aeb Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 14 Mar 2023 09:43:40 +0100 Subject: [PATCH] Disable reading MMU register 0x21 It has proven to be too unreliable and may confuse end users. --- Firmware/mmu2_protocol_logic.cpp | 1 - Firmware/mmu2_protocol_logic.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Firmware/mmu2_protocol_logic.cpp b/Firmware/mmu2_protocol_logic.cpp index 58f34a31d..9c91776a0 100644 --- a/Firmware/mmu2_protocol_logic.cpp +++ b/Firmware/mmu2_protocol_logic.cpp @@ -35,7 +35,6 @@ const uint8_t ProtocolLogic::regs8Addrs[ProtocolLogic::regs8Count] PROGMEM = { const uint8_t ProtocolLogic::regs16Addrs[ProtocolLogic::regs16Count] PROGMEM = { 4, // MMU errors - aka statistics 0x1a, // Pulley position [mm] - 0x21, // MCU bandgap voltage }; const uint8_t ProtocolLogic::initRegs8Addrs[ProtocolLogic::initRegs8Count] PROGMEM = { diff --git a/Firmware/mmu2_protocol_logic.h b/Firmware/mmu2_protocol_logic.h index b7128806b..53ec0002a 100644 --- a/Firmware/mmu2_protocol_logic.h +++ b/Firmware/mmu2_protocol_logic.h @@ -365,10 +365,10 @@ private: uint8_t regs8[regs8Count] = { 0, 0, 0 }; // 16bit registers - static constexpr uint8_t regs16Count = 3; + static constexpr uint8_t regs16Count = 2; static_assert(regs16Count > 0); // code is not ready for empty lists of registers static const uint8_t regs16Addrs[regs16Count] PROGMEM; - uint16_t regs16[regs16Count] = { 0, 0, 0 }; + uint16_t regs16[regs16Count] = { 0, 0 }; // 8bit init values to be sent to the MMU after line up static constexpr uint8_t initRegs8Count = 2;