/branches/extra_encoders_rework merged

This commit is contained in:
maxim.karban@gmail.com
2012-05-21 19:08:21 +00:00
parent 8a62c195d2
commit 0682da0ff1
12 changed files with 105 additions and 60 deletions
+9 -2
View File
@@ -860,12 +860,19 @@ void menuProcPhaseOne(uint8_t event)
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
putsRotaryEncoderMode((14+t)*FW+2, y, s_currIdx, t, (attr && m_posHorz==4+t) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
if (attr && m_posHorz==4+t && ((s_editMode>0) || p1valdiff)) {
int16_t v = phaseaddress(s_currIdx)->rotaryEncoders[t];
int16_t v;
if(t < (NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS))
v = phaseaddress(s_currIdx)->rotaryEncoders[t];
else
v = g_model.rotaryEncodersExtra[s_currIdx][t-(NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS)];
if (v < ROTARY_ENCODER_MAX) v = ROTARY_ENCODER_MAX;
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_PHASES-1, EE_MODEL);
if (checkIncDec_Ret) {
if (v == ROTARY_ENCODER_MAX) v = 0;
phaseaddress(s_currIdx)->rotaryEncoders[t] = v;
if(t < (NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS))
phaseaddress(s_currIdx)->rotaryEncoders[t] = v;
else
g_model.rotaryEncodersExtra[s_currIdx][t-(NUM_ROTARY_ENCODERS - NUM_EXTRA_ROTARY_ENCODERS)] = v;
}
}
}