mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 01:15:38 -04:00
Use PPB correction to adjust clock generator XTAL PLLA frequency.
Addresses issue #40.
This commit is contained in:
parent
fe7dcdc613
commit
8f326e2d8e
3 changed files with 4 additions and 5 deletions
|
@ -37,7 +37,6 @@
|
|||
using namespace hackrf::one;
|
||||
|
||||
#include "portapack.hpp"
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
|
||||
namespace radio {
|
||||
|
||||
|
@ -118,9 +117,7 @@ void set_direction(const rf::Direction new_direction) {
|
|||
}
|
||||
|
||||
bool set_tuning_frequency(const rf::Frequency frequency) {
|
||||
const int32_t frequency_correction = frequency * portapack::persistent_memory::correction_ppb() / 1000000000;
|
||||
rf::Frequency corrected_frequency = frequency + frequency_correction;
|
||||
const auto tuning_config = tuning::config::create(corrected_frequency);
|
||||
const auto tuning_config = tuning::config::create(frequency);
|
||||
if( tuning_config.is_valid() ) {
|
||||
first_if.disable();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue