Make m_servo in Valve non-const
authorLukáš Jiřiště <jiriste@icpf.cas.cz>
Tue, 10 Dec 2024 15:31:19 +0000 (16:31 +0100)
committerLukáš Jiřiště <jiriste@icpf.cas.cz>
Tue, 10 Dec 2024 15:31:19 +0000 (16:31 +0100)
This is done to appease the compiler about calling non-const methods on
servo. The servo in the valve still should not be changed after
initialization.

Valve.h

diff --git a/Valve.h b/Valve.h
index 0701423620879d5e9f262dbd7e684168be8a6d46..e5be9c0b1daeb4b84118f558c445635217d1e392 100644 (file)
--- a/Valve.h
+++ b/Valve.h
@@ -6,7 +6,7 @@
 class Valve
 {
        private:
-               const Servo     m_servo;
+               Servo   m_servo;
                const int       m_usec_opened;
                const int       m_usec_barely_opened;
                const int       m_usec_closed;