2016-06-16 10:02:46 -04:00
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include "push2.h"
|
|
|
|
|
|
|
|
using namespace ArdourSurface;
|
|
|
|
using std::make_pair;
|
|
|
|
using std::max;
|
|
|
|
using std::min;
|
|
|
|
|
|
|
|
void
|
|
|
|
Push2::LED::set_color (uint8_t ci)
|
|
|
|
{
|
2016-06-16 14:06:16 -04:00
|
|
|
_color_index = max (uint8_t(0), min (uint8_t(127), ci));
|
2016-06-16 10:02:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Push2::LED::set_state (LED::State s)
|
|
|
|
{
|
2016-06-16 14:06:16 -04:00
|
|
|
_state = s;
|
2016-06-16 10:02:46 -04:00
|
|
|
}
|
|
|
|
|