X-Git-Url: http://www.average.org/gitweb/?p=pulsecounter.git;a=blobdiff_plain;f=linux%2Fpulsecounter.c;fp=linux%2Fpulsecounter.c;h=cc05da904ce1f3d3acb6f09a881a7dc2615ff43a;hp=89568c98597a972c45fb24e562c03642558e58a9;hb=c304a2583cac01bbf48a3d43cb3299a24ec362e6;hpb=4f113757dc43e63a616d7719c09ba921df6ee48c 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;