Grrrrrrrr.

v4 didn't compile without the EXTRA_ROTARY_ENCODERS option
companion9x didn't compile
This commit is contained in:
bsongis
2012-05-21 20:47:06 +00:00
parent 72d8d5e255
commit 20a7e91796
3 changed files with 27 additions and 6 deletions
+4
View File
@@ -581,11 +581,15 @@ void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
#if defined(PCBV4)
void putsRotaryEncoderMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
{
#if defined(EXTRA_ROTARY_ENCODERS)
int16_t v;
if(idx < (NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS))
v = phaseaddress(phase)->rotaryEncoders[idx];
else
v = g_model.rotaryEncodersExtra[phase][idx - (NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS)];
#else
int16_t v = phaseaddress(phase)->rotaryEncoders[idx];
#endif
if (v > ROTARY_ENCODER_MAX) {
uint8_t p = v - ROTARY_ENCODER_MAX - 1;