#include "device-functions.h" /* START FUNCTION DESCRIPTION ******************************************** Set_frequency SYNTAX: Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq) KEYWORDS: DESCRIPTION: sets the offset DAC. RETURN VALUE: error code (zero = OK). END DESCRIPTION **********************************************************/ /*----------------------------------------------------------------------------------------------------------*/ int Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq) { // keep, but ignore, the first 3 parameters for now // all this does right now is check the frequency range, // and store the set value. /* abandon if high channel selected by user but not enabled by firmware */ if (channel && !globals.Flash.ChanKey_frequency) { return InvalidChannel; } if (set_freq < 1.0) { return freq_lower_limit; } if (set_freq > 1.0e6) { return freq_upper_limit; } globals.ChannelState[channel].frequency=set_freq; return OK; }