Line data Source code
1 : #pragma once 2 : 3 : #include <Control_Surface/Control_Surface_Class.hpp> 4 : 5 : BEGIN_CS_NAMESPACE 6 : 7 : class DigitalCCSender { 8 : public: 9 19 : DigitalCCSender(uint8_t onValue = 0x7F, uint8_t offValue = 0x00) 10 19 : : onValue{onValue}, offValue{offValue} {} 11 : 12 11 : void sendOn(MIDICNChannelAddress address) { 13 11 : Control_Surface.MIDI().sendCC(address, onValue); 14 11 : } 15 11 : void sendOff(MIDICNChannelAddress address) { 16 11 : Control_Surface.MIDI().sendCC(address, offValue); 17 11 : } 18 : 19 : uint8_t getOnValue() const { return this->onValue; } 20 : void setOnValue(uint8_t onValue) { this->onValue = onValue; } 21 : uint8_t getOffValue() const { return this->offValue; } 22 : void setOffValue(uint8_t offValue) { this->offValue = offValue; } 23 : 24 : private: 25 : uint8_t onValue; 26 : uint8_t offValue; 27 : }; 28 : 29 : END_CS_NAMESPACE