summaryrefslogtreecommitdiffstats
path: root/app/pll.c
diff options
context:
space:
mode:
authorroot <root@lab.panaceas.james.local>2019-02-19 18:08:31 +0000
committerroot <root@lab.panaceas.james.local>2019-02-19 18:08:31 +0000
commit9bbf1d200534cd946c4776e29457f989147b45b2 (patch)
tree6d167a3bede4ae9da3912562ad9fb5baf76d6770 /app/pll.c
parentb3c6320899d6b27899ab3c67c745e8d3b29af3a2 (diff)
downloadclock-9bbf1d200534cd946c4776e29457f989147b45b2.tar.gz
clock-9bbf1d200534cd946c4776e29457f989147b45b2.tar.bz2
clock-9bbf1d200534cd946c4776e29457f989147b45b2.zip
everything working, even with fucked phy
Diffstat (limited to 'app/pll.c')
-rw-r--r--app/pll.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/pll.c b/app/pll.c
index 742aad0..56e8e21 100644
--- a/app/pll.c
+++ b/app/pll.c
@@ -19,6 +19,13 @@ int pll_valid = 0;
static int warming_up = WARM_UP;
+void pll_meh(void)
+{
+ printf (" %"PRId64" %"PRId64" %" PRId64 "\r\n",
+ pll_freq,offset,phase);
+
+}
+
static void modify_pll_freq (uint64_t now, int d)
{
@@ -50,6 +57,7 @@ void pll_dispatch (uint64_t edge)
return;
}
+
{
int diff, hf;
@@ -73,7 +81,7 @@ void pll_dispatch (uint64_t edge)
else if (out_of_lock <= JUMP_TICKS)
out_of_lock = 0;
-#if 0
+#if 1
printf ("PLL pd %.3f pll_freq %d phase %d\r\n", (float) f, (int) pll_freq, (int) phase);
#endif
@@ -106,6 +114,8 @@ void pll_set_offset (EPOCH epoch, uint64_t abs)
offset = epoch.s - abs;
pll_valid = 1;
+time_known=1;
+
}