X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;f=linux%2Fpulsecounter.c;h=cc05da904ce1f3d3acb6f09a881a7dc2615ff43a;hb=refs%2Fheads%2Fcountjitter;hp=89568c98597a972c45fb24e562c03642558e58a9;hpb=757a8cd063d57fa1dc7628cac5e8cde9d45c10b9;p=pulsecounter.git diff --git a/linux/pulsecounter.c b/linux/pulsecounter.c index 89568c9..cc05da9 100644 --- a/linux/pulsecounter.c +++ b/linux/pulsecounter.c @@ -96,12 +96,17 @@ static void events_handler(const uint8_t *pdu, uint16_t len, gpointer user_data) handle = bt_get_le16(&pdu[1]); which = pdu[3]; - if ((pdu[0] == 0x1b) && (handle == 0x0012) && (len == 9) && - ((which == 1) || (which == 2))) { + if ((pdu[0] == 0x1b) && (handle == 0x0012) && (len == 9)) { uint32_t val = bt_get_le32(&pdu[5]); - g_debug("store: \"%hhu,%u\"\n", which, val); - if (dbstore(which, val)) - g_warning("error storing \"%hhu,%u\"\n", which, val); + + if ((which == 1) || (which == 2)) { + g_debug("store: \"%hhu,%u\"\n", which, val); + if (dbstore(which, val)) + g_warning("error storing \"%hhu,%u\"\n", + which, val); + } else { + g_debug("jitter: \"%hhu,%u\"\n", which, val); + } } else { time_t t; int i;