Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 2615 → Rev 2616

/trunk/apps/sequencers/midibox_seq_v4/CHANGELOG.txt
54,6 → 54,7
o V4+ AOUT: support for AOUT channel calibration.
In the CV configuration menu, turn GP ENC #7 until 0V/1V/2V/.../Max will be visible.
Calibrate the offset of the target value with ENC #8.
Press GP #8 to cycle between min/0/max offset of the calibration point.
Each V has a dedicated calibration value which can be configured this way, the output will be interpolated accordingly.
Note that with exiting the CV configuration menu the calibration values are stored on SD Card in the MBSEQ_GC.V4 file
(-> CV_Cali <cv-counting-from-0>).
/trunk/apps/sequencers/midibox_seq_v4/core/seq_ui_cv.c
132,6 → 132,33
 
case SEQ_UI_ENCODER_GP8:
ui_selected_item = ITEM_CALIBRATION_2;
 
// extra: cycle Min/0/Max offset via GP8 button
if( incrementer == 0 ) {
u8 mode = SEQ_CV_CaliModeGet();
if( mode >= AOUT_NUM_CALI_MODES ) {
u16 *cali_points = SEQ_CV_CaliPointsPtrGet(selected_cv);
if( cali_points != NULL ) {
s32 x = mode - AOUT_NUM_CALI_MODES;
if( x >= AOUT_NUM_CALI_POINTS_X )
x = AOUT_NUM_CALI_POINTS_X-1;
 
u16 cali_mid = AOUT_CaliCfgValueGet();
u16 cali_min = 0;
u16 cali_max = 0xffff;
 
if( cali_points[x] == cali_min )
cali_points[x] = cali_mid;
else if( cali_points[x] == cali_max )
cali_points[x] = cali_min;
else
cali_points[x] = cali_max;
 
SEQ_CV_CaliModeSet(selected_cv, SEQ_CV_CaliModeGet()); // this will update the CV pin
ui_store_file_required = 1;
}
}
}
break;
 
case SEQ_UI_ENCODER_GP9:
246,7 → 273,7
u16 cali_value = cali_points[x] >> 4; // 16bit -> 12bit
if( SEQ_UI_Var16_Inc(&cali_value, 0, 0xffff, incrementer) >= 0 ) {
if( cali_value >= 0xfff )
cali_value = 0xfff;
cali_value = 0xffff;
else
cali_value <<= 4; // 12bit -> 16bit
cali_points[x] = cali_value;