From 048200063a1a3e576717311380a6b9eef314c0cd Mon Sep 17 00:00:00 2001 From: David Crocker Date: Sun, 19 Dec 2021 15:42:33 +0000 Subject: Removed function hiding + other minor changes for eCv --- src/Comms/PanelDueUpdater.h | 2 +- src/Fans/LocalFan.cpp | 4 ++-- src/GPIO/GpOutPort.cpp | 4 ++-- src/Hardware/IoPorts.cpp | 6 +++--- src/Hardware/IoPorts.h | 4 ++-- src/Platform/Platform.cpp | 2 +- src/Platform/Platform.h | 4 ++-- src/Version.h | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Comms/PanelDueUpdater.h b/src/Comms/PanelDueUpdater.h index 81627b8a..f7589d16 100644 --- a/src/Comms/PanelDueUpdater.h +++ b/src/Comms/PanelDueUpdater.h @@ -34,7 +34,7 @@ public: virtual ~PanelDueUpdater() noexcept; void Spin() noexcept; void Start(const StringRef& filenameRef, const uint32_t serialChan = 1) noexcept; - bool Idle() const noexcept { return state == FlashState::idle; } + bool Idle() const noexcept { return state.RawValue() == FlashState::idle; } private: NamedEnum(FlashState, uint8_t, diff --git a/src/Fans/LocalFan.cpp b/src/Fans/LocalFan.cpp index 5e404258..c8205b21 100644 --- a/src/Fans/LocalFan.cpp +++ b/src/Fans/LocalFan.cpp @@ -38,11 +38,11 @@ LocalFan::~LocalFan() noexcept GCodeResult LocalFan::ReportPortDetails(const StringRef& str) const noexcept { str.printf("Fan %u", fanNumber); - port.AppendDetails(str); + port.AppendFullDetails(str); if (tachoPort.IsValid()) { str.cat(" tacho"); - tachoPort.AppendDetails(str); + tachoPort.AppendBasicDetails(str); } return GCodeResult::ok; } diff --git a/src/GPIO/GpOutPort.cpp b/src/GPIO/GpOutPort.cpp index d15f9267..188bb9f7 100644 --- a/src/GPIO/GpOutPort.cpp +++ b/src/GPIO/GpOutPort.cpp @@ -144,7 +144,7 @@ GCodeResult GpOutputPort::Configure(uint32_t gpioNumber, bool isServo, GCodeBuff } #endif reply.printf("GPIO/servo port %" PRIu32, gpioNumber); - port.AppendDetails(reply); + port.AppendFullDetails(reply); } return GCodeResult::ok; } @@ -207,7 +207,7 @@ GCodeResult GpOutputPort::AssignFromRemote(uint32_t gpioPortNumber, const CanMes else { reply.printf("GPIO/servo port %" PRIu32, gpioPortNumber); - port.AppendDetails(reply); + port.AppendFullDetails(reply); } return GCodeResult::ok; } diff --git a/src/Hardware/IoPorts.cpp b/src/Hardware/IoPorts.cpp index 07484371..eed56846 100644 --- a/src/Hardware/IoPorts.cpp +++ b/src/Hardware/IoPorts.cpp @@ -394,7 +394,7 @@ void IoPort::ToggleInvert(bool pInvert) noexcept } } -void IoPort::AppendDetails(const StringRef& str) const noexcept +void IoPort::AppendBasicDetails(const StringRef& str) const noexcept { if (IsValid()) { @@ -654,9 +654,9 @@ void PwmPort::AppendFrequency(const StringRef& str) const noexcept } } -void PwmPort::AppendDetails(const StringRef& str) const noexcept +void PwmPort::AppendFullDetails(const StringRef& str) const noexcept { - IoPort::AppendDetails(str); + AppendBasicDetails(str); AppendFrequency(str); } diff --git a/src/Hardware/IoPorts.h b/src/Hardware/IoPorts.h index b5c0d29f..e47e3935 100644 --- a/src/Hardware/IoPorts.h +++ b/src/Hardware/IoPorts.h @@ -22,7 +22,7 @@ public: bool SetMode(PinAccess access) noexcept; void Release() noexcept; - void AppendDetails(const StringRef& str) const noexcept; + void AppendBasicDetails(const StringRef& str) const noexcept; static size_t AssignPorts(GCodeBuffer& gb, const StringRef& reply, PinUsedBy neededFor, size_t numPorts, IoPort * const ports[], const PinAccess access[]) THROWS(GCodeException); bool AssignPort(GCodeBuffer& gb, const StringRef& reply, PinUsedBy neededFor, PinAccess access) THROWS(GCodeException); @@ -102,7 +102,7 @@ class PwmPort : public IoPort public: PwmPort() noexcept; - void AppendDetails(const StringRef& str) const noexcept; // hides the one in IoPort + void AppendFullDetails(const StringRef& str) const noexcept; void AppendFrequency(const StringRef& str) const noexcept; // append the frequency if the port is valid void SetFrequency(PwmFrequency freq) noexcept { frequency = freq; } PwmFrequency GetFrequency() const noexcept { return frequency; } diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index 7c8b9a8b..718ab2d7 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -4507,7 +4507,7 @@ GCodeResult Platform::GetSetAncillaryPwm(GCodeBuffer& gb, const StringRef& reply if (!seen) { reply.copy("Extrusion ancillary PWM"); - extrusionAncilliaryPwmPort.AppendDetails(reply); + extrusionAncilliaryPwmPort.AppendFullDetails(reply); } return GCodeResult::ok; } diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h index fca11c6a..efbdd0e7 100644 --- a/src/Platform/Platform.h +++ b/src/Platform/Platform.h @@ -218,7 +218,8 @@ public: void Init(uint16_t val) volatile noexcept { - const irqflags_t flags = IrqSave(); + AtomicCriticalSectionLocker lock; + sum = (uint32_t)val * (uint32_t)numAveraged; index = 0; isValid = false; @@ -226,7 +227,6 @@ public: { readings[i] = val; } - IrqRestore(flags); } // Call this to put a new reading into the filter diff --git a/src/Version.h b/src/Version.h index df884df1..2c5f5e68 100644 --- a/src/Version.h +++ b/src/Version.h @@ -10,7 +10,7 @@ #ifndef VERSION // Note: the complete VERSION string must be in standard version number format and must not contain spaces! This is so that DWC can parse it. -# define MAIN_VERSION "3.4.0beta7" +# define MAIN_VERSION "3.4.0beta7+1" # ifdef USE_CAN0 # define VERSION_SUFFIX "(CAN0)" # else -- cgit v1.2.3