diff --git a/README.md b/README.md index 58b5eaf..4281724 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ To ignore annoying frequency that you are not interested use `ignored_frequencie } ``` -## Use multipe devices +## Use multiple devices To use two dongles with serials `11111111` and `22222222`: ``` @@ -259,7 +259,7 @@ To use two dongles with serials `11111111` and `22222222`: If you have multiple `rtl-sdr` dongles with the same serial you can change it with `rtl_eeprom -s 12345678`. -## Scan multipe frequencies ranges +## Scan multiple frequencies ranges To scan `144 Mhz - 146 Mhz` and `440 Mhz - 442 Mhz` in the same time: ``` diff --git a/sources/radio/hackrf_sdr_device.cpp b/sources/radio/hackrf_sdr_device.cpp index 025f417..9e25671 100644 --- a/sources/radio/hackrf_sdr_device.cpp +++ b/sources/radio/hackrf_sdr_device.cpp @@ -147,7 +147,7 @@ void HackrfSdrDevice::setup(const FrequencyRange &frequencyRange) { if (frequencyRange.center() != m_frequency) { Logger::debug("HackRf", "set center {}", frequencyToString(frequencyRange.center())); if (hackrf_set_freq(m_device, frequencyRange.center()) != HACKRF_SUCCESS) { - throw std::runtime_error("can not set frequnecy"); + throw std::runtime_error("can not set frequency"); } m_frequency = frequencyRange.center(); } diff --git a/sources/radio/recorder.cpp b/sources/radio/recorder.cpp index 2c20110..74c2c67 100644 --- a/sources/radio/recorder.cpp +++ b/sources/radio/recorder.cpp @@ -45,8 +45,8 @@ void Recorder::processSamples(const std::chrono::milliseconds& time, const Frequ m_lastDataTime = std::max(m_lastDataTime, time); for (auto it = m_workers.begin(); it != m_workers.end();) { auto f = [it](const std::pair& data) { return it->first == data.first; }; - const auto transmisionInProgress = std::any_of(activeTransmissions.begin(), activeTransmissions.end(), f); - if (transmisionInProgress) { + const auto transmissionInProgress = std::any_of(activeTransmissions.begin(), activeTransmissions.end(), f); + if (transmissionInProgress) { it++; } else { const auto frequencyRange = it->first; diff --git a/sources/radio/sdr_scanner.cpp b/sources/radio/sdr_scanner.cpp index 03b54c2..9a4f08d 100644 --- a/sources/radio/sdr_scanner.cpp +++ b/sources/radio/sdr_scanner.cpp @@ -97,7 +97,7 @@ void SdrScanner::checkManualRecording() { const auto frequencyRange = m_manualRecording->frequencyRange; const auto totalTime = m_manualRecording->time; - Logger::info("Scanner", "start manual recoridng: {}, time: {} seconds", frequencyRange.toString(), std::chrono::duration_cast(totalTime).count()); + Logger::info("Scanner", "start manual recording: {}, time: {} seconds", frequencyRange.toString(), std::chrono::duration_cast(totalTime).count()); m_device->startStream(frequencyRange); while (m_isRunning && time() - startTime <= totalTime) { m_device->waitForData(); diff --git a/tests/test_ring_buffer.cpp b/tests/test_ring_buffer.cpp index 4686187..b598de1 100644 --- a/tests/test_ring_buffer.cpp +++ b/tests/test_ring_buffer.cpp @@ -38,7 +38,7 @@ TEST(RingBufferTest, Overflow) { TEST(RingBufferTest, Round) { std::vector push; - std::vector poped; + std::vector popped; constexpr auto PUSH_SIZE = 1229; constexpr auto POP_SIZE = 1231; @@ -50,16 +50,16 @@ TEST(RingBufferTest, Round) { RingBuffer buffer(BUFFER_SIZE); uint32_t pushed = 0; - while (poped.size() < push.size()) { + while (popped.size() < push.size()) { while (buffer.availableDataSize() < POP_SIZE && pushed < push.size()) { buffer.push(push.data() + pushed, PUSH_SIZE); pushed += PUSH_SIZE; } while (POP_SIZE <= buffer.availableDataSize()) { const auto tmp = buffer.pop(POP_SIZE); - std::copy(tmp.begin(), tmp.end(), std::back_inserter(poped)); + std::copy(tmp.begin(), tmp.end(), std::back_inserter(popped)); } } - EXPECT_EQ(push, poped); + EXPECT_EQ(push, popped); }