PPM value is used even if NTP has not yet locked.

Theory being that the unlocked PPM value is still likely better than no
PPM value.
master
James Peroulas 2013-08-16 18:25:27 -05:00
rodzic 6516cb94c4
commit 3c6d629d1c
2 zmienionych plików z 5 dodań i 2 usunięć

3
README
Wyświetl plik

@ -203,6 +203,9 @@ Credits:
is more precise and does not vary based on system load or PWM clock is more precise and does not vary based on system load or PWM clock
frequency. frequency.
Michael Tatarinov for adding a patch to get PPM info directly from the
kernel.
[1] PiFM code from [1] PiFM code from
http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter
[2] Original WSPR Pi transmitter code by Dan: [2] Original WSPR Pi transmitter code by Dan:

Wyświetl plik

@ -921,8 +921,8 @@ void update_ppm(
status = ntp_adjtime(&ntx); status = ntp_adjtime(&ntx);
if (status != TIME_OK) { if (status != TIME_OK) {
cerr << "Error: clock not synchronized" << endl; //cerr << "Error: clock not synchronized" << endl;
return; //return;
} }
ppm_new = (double)ntx.freq/(double)(1 << 16); /* frequency scale */ ppm_new = (double)ntx.freq/(double)(1 << 16); /* frequency scale */