GetClosestFrequencyIndex() traverses m_arrSignalGeneratorCalRanges_KHZ[] in reverse order. Valid indexes are 0..len(self.m_arrSignalGeneratorCalRanges_KHZ) - 1. len(self.m_arrSignalGeneratorCalRanges_KHZ) is not a valid index into the array.
range() fixed to generate correct indexes from len-1 to 0.
GetClosestFrequencyIndex()
traversesm_arrSignalGeneratorCalRanges_KHZ[]
in reverse order. Valid indexes are0..len(self.m_arrSignalGeneratorCalRanges_KHZ) - 1
.len(self.m_arrSignalGeneratorCalRanges_KHZ)
is not a valid index into the array.range() fixed to generate correct indexes from len-1 to 0.