From 59504d4a96249878a3f4cbdb3237d6337307f0c7 Mon Sep 17 00:00:00 2001 From: Mark Zakharyan Date: Wed, 30 Oct 2024 17:08:19 -0700 Subject: [PATCH] fixed dac led ramp comms malform bug --- m4/src/Peripherals/God.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/m4/src/Peripherals/God.h b/m4/src/Peripherals/God.h index 185152c..2327a78 100644 --- a/m4/src/Peripherals/God.h +++ b/m4/src/Peripherals/God.h @@ -256,13 +256,13 @@ class God { if (numDacChannels < 1 || numAdcChannels < 1) { return OperationResult::Failure("Invalid number of channels"); } - for (int i = 0; i < numAdcChannels; i++) { - if (dac_settling_time_us < - ADCController::getConversionTimeFloat(adcChannels[i])) { - return OperationResult::Failure( - "DAC settling time too short for ADC conversion time"); - } - } + // for (int i = 0; i < numAdcChannels; i++) { + // if (dac_settling_time_us < + // ADCController::getConversionTimeFloat(adcChannels[i])) { + // return OperationResult::Failure( + // "DAC settling time too short for ADC conversion time"); + // } + // } // uint32_t adc_comms_period_us = (1.0/SPI_SPEED)*1e6*8*4; // 8 bits per // byte, 4 bytes per ADC conversion if // (numAdcChannels*numAdcAverages*adc_comms_period_us > dac_interval_us - @@ -327,7 +327,8 @@ class God { float v = total * numAdcAveragesInv; packets[i] = v; } - m4SendFloat(packets, numAdcChannels); + // m4SendFloat(packets, numAdcChannels); // only for debug, not for labrad + m4SendVoltage(packets, numAdcChannels); delete[] packets; x++; }