|
|
|
@ -36,7 +36,6 @@ |
|
|
|
|
#include "effect_modulated_delay.h" |
|
|
|
|
#include "effect_stereo_mono.h" |
|
|
|
|
#include "PluginFx.h" |
|
|
|
|
#include "SoftenValue.hpp" |
|
|
|
|
#include "UI.hpp" |
|
|
|
|
#include "source_microdexed.h" |
|
|
|
|
|
|
|
|
@ -65,8 +64,8 @@ AudioConnection patchCord2(chorus_mixer, 0, modchorus, 0); |
|
|
|
|
AudioConnection patchCord3(delay_mixer, 0, delay_fb_mixer, 0); |
|
|
|
|
AudioConnection patchCord4(delay_fb_mixer, delay1); |
|
|
|
|
AudioConnection patchCord5(delay1, 0, delay_fb_mixer, 1); |
|
|
|
|
AudioConnection patchCord6(delay_mixer, 0, master_mixer_r, 2); |
|
|
|
|
AudioConnection patchCord7(delay_mixer, 0, master_mixer_l, 2); |
|
|
|
|
AudioConnection patchCord6(delay1, 0, master_mixer_r, 2); |
|
|
|
|
AudioConnection patchCord7(delay1, 0, master_mixer_l, 2); |
|
|
|
|
AudioConnection patchCord8(master_mixer_r, volume_r); |
|
|
|
|
AudioConnection patchCord9(master_mixer_l, volume_l); |
|
|
|
|
AudioConnection patchCord10(volume_r, 0, stereomono1, 0); |
|
|
|
@ -155,9 +154,6 @@ uint8_t midi_timing_counter = 0; // 24 per qarter |
|
|
|
|
elapsedMillis midi_timing_timestep; |
|
|
|
|
uint16_t midi_timing_quarter = 0; |
|
|
|
|
elapsedMillis long_button_pressed; |
|
|
|
|
SoftenValue <uint8_t> soften_volume; |
|
|
|
|
SoftenValue <uint8_t> soften_filter_res[NUM_DEXED]; |
|
|
|
|
SoftenValue <uint8_t> soften_filter_cut[NUM_DEXED]; |
|
|
|
|
//elapsedMicros fill_audio_buffer;
|
|
|
|
|
elapsedMillis control_rate; |
|
|
|
|
uint8_t active_voices = 0; |
|
|
|
@ -360,7 +356,7 @@ void setup() |
|
|
|
|
#ifdef USE_REVERB |
|
|
|
|
// INIT REVERB
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
reverb_mixer.gain(instance_id, 0.0); |
|
|
|
|
reverb_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(REVERB, 1.0); |
|
|
|
|
master_mixer_l.gain(REVERB, 1.0); |
|
|
|
|
freeverbs1.roomsize(mapfloat(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); |
|
|
|
@ -369,10 +365,10 @@ void setup() |
|
|
|
|
|
|
|
|
|
// INIT DELAY
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
delay_mixer.gain(instance_id, 0.0); |
|
|
|
|
delay_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(DELAY, 1.0); |
|
|
|
|
master_mixer_l.gain(DELAY, 1.0); |
|
|
|
|
delay1.delay(0, mapfloat(configuration.delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
delay1.delay(0, mapfloat(configuration.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX))); |
|
|
|
|
// delay_fb_mixer is the feedback-adding mixer
|
|
|
|
|
//delay_fb_mixer.gain(0, 1.0 - (mapfloat(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0))); // original signal
|
|
|
|
|
delay_fb_mixer.gain(0, 1.0); // original signal
|
|
|
|
@ -380,7 +376,7 @@ void setup() |
|
|
|
|
|
|
|
|
|
// INIT CHORUS
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
chorus_mixer.gain(instance_id, 0.0); |
|
|
|
|
chorus_mixer.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0)); |
|
|
|
|
master_mixer_r.gain(CHORUS, 1.0); |
|
|
|
|
master_mixer_l.gain(CHORUS, 1.0); |
|
|
|
|
switch (configuration.chorus_waveform) |
|
|
|
@ -395,6 +391,7 @@ void setup() |
|
|
|
|
modulator.begin(WAVEFORM_TRIANGLE); |
|
|
|
|
} |
|
|
|
|
modulator.phase(0); |
|
|
|
|
modulator.frequency(configuration.chorus_frequency / 10.0); |
|
|
|
|
modulator.amplitude(mapfloat(configuration.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 0.0, 1.0)); |
|
|
|
|
modulator.offset(0.0); |
|
|
|
|
#if MOD_FILTER_OUTPUT == MOD_BUTTERWORTH_FILTER_OUTPUT |
|
|
|
@ -411,19 +408,18 @@ void setup() |
|
|
|
|
modchorus_inverter.gain(-1.0); // stereo mode
|
|
|
|
|
else |
|
|
|
|
modchorus_inverter.gain(1.0); // mono mode
|
|
|
|
|
|
|
|
|
|
// Filter
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
soften_filter_res[instance_id].init(configuration.dexed[instance_id].filter_resonance); |
|
|
|
|
soften_filter_cut[instance_id].init(configuration.dexed[instance_id].filter_cutoff); |
|
|
|
|
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX, 0.0, 1.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(FILTER_RESONANCE_MAX - configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(FILTER_CUTOFF_MAX - configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// set initial volume and pan (read from EEPROM)
|
|
|
|
|
set_volume(configuration.vol, configuration.pan, configuration.mono); |
|
|
|
|
soften_volume.init(configuration.vol); |
|
|
|
|
|
|
|
|
|
#if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC) |
|
|
|
|
// Initialize processor and memory measurements
|
|
|
|
@ -522,55 +518,9 @@ void loop() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// check for value changes and unused voices
|
|
|
|
|
soften_volume.tick(); |
|
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < NUM_DEXED; i++) |
|
|
|
|
{ |
|
|
|
|
active_voices = MicroDexed[i]->getNumNotesPlaying(); |
|
|
|
|
|
|
|
|
|
soften_filter_res[i].tick(); |
|
|
|
|
soften_filter_cut[i].tick(); |
|
|
|
|
|
|
|
|
|
if (soften_filter_res[i].running()) |
|
|
|
|
{ |
|
|
|
|
// soften filter resonance value
|
|
|
|
|
MicroDexed[i]->fx.Reso = (FILTER_RESONANCE_MAX - soften_filter_res[i].value()) / 100.0; |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Filter-Resonance: ")); |
|
|
|
|
Serial.print(MicroDexed[i]->fx.Reso, 5); |
|
|
|
|
Serial.print(F(" Filter-Resonance step: ")); |
|
|
|
|
Serial.print(soften_filter_res[i].steps()); |
|
|
|
|
Serial.print(F(" Filter-Resonance diff: ")); |
|
|
|
|
Serial.println(soften_filter_res[i].diff(), 5); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
// soften filter cutoff value
|
|
|
|
|
if (soften_filter_cut[i].running()) |
|
|
|
|
{ |
|
|
|
|
MicroDexed[i]->fx.Cutoff = (FILTER_CUTOFF_MAX - soften_filter_cut[i].value()) / 100.0; |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Filter-Cutoff: ")); |
|
|
|
|
Serial.print(MicroDexed[i]->fx.Cutoff, 5); |
|
|
|
|
Serial.print(F(" Filter-Cutoff step: ")); |
|
|
|
|
Serial.print(soften_filter_cut[i].steps()); |
|
|
|
|
Serial.print(F(" Filter-Cutoff diff: ")); |
|
|
|
|
Serial.println(soften_filter_cut[i].diff(), 5); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (soften_volume.running()) |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
set_volume(soften_volume.value(), configuration.pan, configuration.mono); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Volume: ")); |
|
|
|
|
Serial.print(configuration.vol, DEC); |
|
|
|
|
Serial.print(F(" step: ")); |
|
|
|
|
Serial.print(soften_volume.steps()); |
|
|
|
|
Serial.print(F(" diff: ")); |
|
|
|
|
Serial.println(soften_volume.diff(), 5); |
|
|
|
|
#endif |
|
|
|
|
active_voices = MicroDexed[instance_id]->getNumNotesPlaying(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -650,7 +600,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
break; |
|
|
|
|
case 7: // Volume
|
|
|
|
|
configuration.vol = map(inValue, 0, 0x7f, VOLUME_MIN, VOLUME_MAX); |
|
|
|
|
soften_volume.update(configuration.vol, SOFTEN_VALUE_CHANGE_STEPS); |
|
|
|
|
set_volume(configuration.vol, configuration.pan, configuration.mono); |
|
|
|
|
break; |
|
|
|
|
case 10: // Pan
|
|
|
|
|
configuration.pan = map(inValue, 0, 0x7f, PANORAMA_MIN, PANORAMA_MAX); |
|
|
|
@ -675,13 +625,11 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
break; |
|
|
|
|
case 103: // CC 103: filter resonance
|
|
|
|
|
configuration.dexed[instance_id].filter_resonance = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX); |
|
|
|
|
//MicroDexed[instance_id]->fx.Reso = (100 - configuration.dexed[instance_id].filter_resonance) / 100.0;
|
|
|
|
|
soften_filter_res[instance_id].update(soften_filter_res[instance_id].value() + (FILTER_RESONANCE_MAX - FILTER_RESONANCE_MIN) / FILTER_RESONANCE_ENC_STEPS, SOFTEN_VALUE_CHANGE_STEPS); |
|
|
|
|
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
break; |
|
|
|
|
case 104: // CC 104: filter cutoff
|
|
|
|
|
configuration.dexed[instance_id].filter_cutoff = map(inValue, 0, 0x7f, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX); |
|
|
|
|
//MicroDexed[instance_id]->fx.Cutoff = (100 - configuration.dexed[instance_id].filter_cutoff) / 100.0;
|
|
|
|
|
soften_filter_cut[instance_id].update(soften_filter_cut[instance_id].value() + (FILTER_CUTOFF_MAX - FILTER_CUTOFF_MIN) / FILTER_CUTOFF_ENC_STEPS, SOFTEN_VALUE_CHANGE_STEPS); |
|
|
|
|
MicroDexed[instance_id]->fx.Cutoff = mapfloat(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
break; |
|
|
|
|
case 105: // CC 105: delay time
|
|
|
|
|
configuration.delay_time = map(inValue, 0, 0x7f, DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
@ -712,6 +660,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) |
|
|
|
|
MicroDexed[instance_id]->setMonoMode(false); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
eeprom_write(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1160,45 +1109,6 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
EEPROM.get(EEPROM_START_ADDRESS, configuration); |
|
|
|
|
/*
|
|
|
|
|
configuration.instances %= INSTANCES_MAX; |
|
|
|
|
configuration.instance_mode %= INSTANCE_MODE_MAX; |
|
|
|
|
configuration.instance_splitpoint %= INSTANCE_SPLITPOINT_MAX; |
|
|
|
|
configuration.vol %= VOLUME_MAX; |
|
|
|
|
configuration.mono %= MONO_MAX; |
|
|
|
|
configuration.reverb_roomsize %= REVERB_ROOMSIZE_MAX; |
|
|
|
|
configuration.reverb_damping %= REVERB_DAMPING_MAX; |
|
|
|
|
configuration.chorus_frequency %= CHORUS_FREQUENCY_MAX; |
|
|
|
|
configuration.chorus_waveform %= CHORUS_WAVEFORM_MAX; |
|
|
|
|
configuration.chorus_depth %= CHORUS_DEPTH_MAX; |
|
|
|
|
configuration.delay_time %= DELAY_TIME_MAX; |
|
|
|
|
configuration.delay_feedback %= DELAY_FEEDBACK_MAX; |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
configuration.dexed[instance_id].midi_channel %= MIDI_CHANNEL_MAX; |
|
|
|
|
configuration.dexed[instance_id].bank %= MAX_BANKS; |
|
|
|
|
configuration.dexed[instance_id].voice %= MAX_VOICES; |
|
|
|
|
configuration.dexed[instance_id].pan %= PANORAMA_MAX; |
|
|
|
|
configuration.dexed[instance_id].reverb_send %= REVERB_SEND_MAX; |
|
|
|
|
configuration.dexed[instance_id].chorus_send %= CHORUS_SEND_MAX; |
|
|
|
|
configuration.dexed[instance_id].delay_send %= DELAY_SEND_MAX; |
|
|
|
|
configuration.dexed[instance_id].filter_cutoff %= FILTER_CUTOFF_MAX; |
|
|
|
|
configuration.dexed[instance_id].filter_resonance %= FILTER_RESONANCE_MAX; |
|
|
|
|
configuration.dexed[instance_id].loudness %= LOUDNESS_MAX; |
|
|
|
|
configuration.dexed[instance_id].polyphony %= POLYPHONY_MAX; |
|
|
|
|
configuration.dexed[instance_id].engine %= ENGINE_MAX; |
|
|
|
|
configuration.dexed[instance_id].monopoly %= MONOPOLY_MAX; |
|
|
|
|
configuration.dexed[instance_id].pb_range %= PB_RANGE_MAX; |
|
|
|
|
configuration.dexed[instance_id].pb_step %= PB_STEP_MAX; |
|
|
|
|
configuration.dexed[instance_id].mw_range %= MW_RANGE_MAX; |
|
|
|
|
configuration.dexed[instance_id].mw_assign %= MW_ASSIGN_MAX; |
|
|
|
|
configuration.dexed[instance_id].fc_range %= FC_RANGE_MAX; |
|
|
|
|
configuration.dexed[instance_id].fc_assign %= FC_ASSIGN_MAX; |
|
|
|
|
configuration.dexed[instance_id].bc_range %= BC_RANGE_MAX; |
|
|
|
|
configuration.dexed[instance_id].bc_assign %= BC_ASSIGN_MAX; |
|
|
|
|
configuration.dexed[instance_id].at_range %= AT_RANGE_MAX; |
|
|
|
|
configuration.dexed[instance_id].at_assign %= AT_ASSIGN_MAX; |
|
|
|
|
configuration.dexed[instance_id].op_enabled %= 0x3f; */ |
|
|
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
@ -1210,16 +1120,61 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); |
|
|
|
|
MicroDexed[instance_id]->doRefreshVoice(); |
|
|
|
|
} |
|
|
|
|
Serial.println(F("OK, loaded!")); |
|
|
|
|
} |
|
|
|
|
Serial.println(F("OK, loaded!")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
check_configuration(); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
show_configuration(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (configuration.vol > 100) |
|
|
|
|
configuration.vol = 100; |
|
|
|
|
configuration.vol = 100; // just to be sure ;-)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void check_configuration(void) |
|
|
|
|
{ |
|
|
|
|
configuration.instances = constrain(configuration.instances, INSTANCES_MIN, INSTANCES_MAX); |
|
|
|
|
configuration.instance_mode = constrain(configuration.instance_mode, INSTANCE_MODE_MIN, INSTANCE_MODE_MAX); |
|
|
|
|
configuration.instance_splitpoint = constrain(configuration.instance_splitpoint, INSTANCE_SPLITPOINT_MAX, INSTANCE_SPLITPOINT_MAX); |
|
|
|
|
configuration.vol = constrain(configuration.vol, VOLUME_MIN, VOLUME_MAX); |
|
|
|
|
configuration.pan = constrain(configuration.pan, PANORAMA_MIN, PANORAMA_MAX); |
|
|
|
|
configuration.mono = constrain(configuration.mono, MONO_MIN, MONO_MAX); |
|
|
|
|
configuration.reverb_roomsize = constrain(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX); |
|
|
|
|
configuration.reverb_damping = constrain(configuration.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX); |
|
|
|
|
configuration.chorus_frequency = constrain(configuration.chorus_frequency, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX); |
|
|
|
|
configuration.chorus_waveform = constrain(configuration.chorus_waveform, CHORUS_WAVEFORM_MIN, CHORUS_WAVEFORM_MAX); |
|
|
|
|
configuration.chorus_depth = constrain(configuration.chorus_depth, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX); |
|
|
|
|
configuration.delay_time = constrain(configuration.delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
|
configuration.delay_feedback = constrain(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX); |
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
configuration.dexed[instance_id].midi_channel = constrain(configuration.dexed[instance_id].midi_channel, MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); |
|
|
|
|
configuration.dexed[instance_id].bank = constrain(configuration.dexed[instance_id].bank, 0, MAX_BANKS); |
|
|
|
|
configuration.dexed[instance_id].voice = constrain(configuration.dexed[instance_id].voice, 0, MAX_VOICES); |
|
|
|
|
configuration.dexed[instance_id].reverb_send = constrain(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX); |
|
|
|
|
configuration.dexed[instance_id].chorus_send = constrain(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX); |
|
|
|
|
configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX); |
|
|
|
|
configuration.dexed[instance_id].filter_cutoff = constrain(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX); |
|
|
|
|
configuration.dexed[instance_id].filter_resonance = constrain(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX); |
|
|
|
|
configuration.dexed[instance_id].loudness = constrain(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX); |
|
|
|
|
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony, POLYPHONY_MIN, POLYPHONY_MAX); |
|
|
|
|
configuration.dexed[instance_id].engine = constrain(configuration.dexed[instance_id].engine, ENGINE_MIN, ENGINE_MAX); |
|
|
|
|
configuration.dexed[instance_id].monopoly = constrain(configuration.dexed[instance_id].monopoly, MONOPOLY_MIN, MONOPOLY_MAX); |
|
|
|
|
configuration.dexed[instance_id].pb_range = constrain(configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].pb_step = constrain(configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX); |
|
|
|
|
configuration.dexed[instance_id].mw_range = constrain(configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].mw_assign = constrain(configuration.dexed[instance_id].mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].fc_range = constrain(configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].fc_assign = constrain(configuration.dexed[instance_id].fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].bc_range = constrain(configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].bc_assign = constrain(configuration.dexed[instance_id].bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].at_range = constrain(configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX); |
|
|
|
|
configuration.dexed[instance_id].at_assign = constrain(configuration.dexed[instance_id].at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); |
|
|
|
|
configuration.dexed[instance_id].op_enabled = constrain(configuration.dexed[instance_id].op_enabled, OP_ENABLED_MIN, OP_ENABLED_MAX); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void init_configuration(void) |
|
|
|
|