@@ -341,6 +341,18 @@ public:
341
341
auto_target_frequencies_[9 ] = target_frequency * 64 .0f ; // +6V
342
342
break ;
343
343
}
344
+ #elif defined(BUCHLA_4U)
345
+ /* can't use pow (busts the available memory at this point), so we unroll ... */
346
+ auto_target_frequencies_[0 ] = target_frequency * 1 .0f ; // 0V
347
+ auto_target_frequencies_[1 ] = target_frequency * 2 .0f ; // +1.2V
348
+ auto_target_frequencies_[2 ] = target_frequency * 4 .0f ; // +2.4V
349
+ auto_target_frequencies_[3 ] = target_frequency * 8 .0f ; // +3.6V
350
+ auto_target_frequencies_[4 ] = target_frequency * 16 .0f ; // +4.8V
351
+ auto_target_frequencies_[5 ] = target_frequency * 32 .0f ; // +6.0V
352
+ auto_target_frequencies_[6 ] = target_frequency * 64 .0f ; // +7.2V
353
+ auto_target_frequencies_[7 ] = target_frequency * 128 .0f ; // +8.4V
354
+ auto_target_frequencies_[8 ] = target_frequency * 256 .0f ; // +9.6V
355
+ auto_target_frequencies_[9 ] = target_frequency * 512 .0f ; // +10.8V
344
356
#else
345
357
/* can't use pow (busts the available memory at this point), so we unroll ... */
346
358
auto_target_frequencies_[0 ] = target_frequency * 0 .125f ; // -3V
@@ -469,21 +481,12 @@ public:
469
481
{
470
482
F_correction_factor_ = 0x1 ; // don't go so fast
471
483
auto_frequency ();
472
- #ifdef BUCHLA_4U
473
- OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero + 0x3 ]);
474
- #else
475
- OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero ]);
476
- #endif
477
-
484
+ OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero ]);
478
485
}
479
486
break ;
480
487
case DAC_VOLT_0_BASELINE:
481
488
// set DAC to 0.000V, default calibration:
482
- #ifdef BUCHLA_4U
483
- OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero + 0x3 ]);
484
- #else
485
- OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero ]);
486
- #endif
489
+ OC::DAC::set (dac_channel_, OC::calibration_data.dac .calibrated_octaves [dac_channel_][OC::DAC::kOctaveZero ]);
487
490
break ;
488
491
case AUTO_CALIBRATION_STEP_LAST:
489
492
// do nothing
0 commit comments