RFExplorer / RFExplorer-for-Python

RF Explorer libraries and examples for Python 3
GNU Lesser General Public License v3.0
51 stars 25 forks source link

fix freq index range in GetClosestFrequencyIndex() #8

Closed aa1i closed 7 years ago

aa1i commented 7 years ago

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.