Commit 726e7cfe authored by Matteo DB's avatar Matteo DB
Browse files

fix lo2 set value

parent 56d596b5
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -251,14 +251,9 @@ bool MixerOperator::setValue(const ACS::doubleSeq& p_values)
	MED_TRACE_MSG(" calculate value ");
    // LO2 specs fiex freq, get the freq, get the power
    size_lo2= m_configuration->getSynthesizerTable("LO2", freq_lo2, power_lo2);
    if (size_lo2 != 1){
        _EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"MixerOperator::setLO");
        impl.setValueName("local oscillator 2 expecting only one configuration for freq/power value");        
        throw impl;
    } 
    if (l_setup.m_fixedLO2[0] != power_lo2[0]){
    if (size_lo2 < 1 ){
        _EXCPT(ComponentErrors::ValueOutofRangeExImpl,impl,"MixerOperator::setLO");
        impl.setValueName("local oscillator 2 conf table freq not matching expencting fixed frequency (2300MHz)");        
        impl.setValueName("local oscillator 2 expecting at least one configuration for freq/power value");        
        throw impl;
    } 
    amp_lo2= power_lo2[0];
@@ -267,6 +262,7 @@ bool MixerOperator::setValue(const ACS::doubleSeq& p_values)
    // LO specs 
    size_lo= m_configuration->getSynthesizerTable("LO", freq_lo, power_lo);
    amp_lo= round(Helpers::linearFit(freq_lo, power_lo, size_lo, trueValue));
    MED_TRACE_FMT("Setting LOs [%f/%f] [%f/%f]", trueValue, amp_lo, l_setup.m_fixedLO2[0], amp_lo2 );
    if (power_lo) delete [] power_lo;
    if (freq_lo) delete [] freq_lo;    
    if (power_lo2) delete [] power_lo2;