LCOV - code coverage report
Current view: top level - src/MIDI_Senders - DigitalCCSender.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 8 8 100.0 %
Date: 2019-11-24 14:50:27 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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

Generated by: LCOV version 1.14-5-g4ff2ed6