Mon, 22 Apr 2024 13:40:21 +0200
Version 0.9.19a3. Fixed segfault in onewire temperature measurement. Fixed json error in onewire device.
configure.ac | file | annotate | diff | comparison | revisions | |
thermferm/one-wire.c | file | annotate | diff | comparison | revisions |
--- a/configure.ac Mon Apr 22 11:33:04 2024 +0200 +++ b/configure.ac Mon Apr 22 13:40:21 2024 +0200 @@ -8,7 +8,7 @@ dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="mbsePi-apps" -VERSION="0.9.19a2" +VERSION="0.9.19a3" COPYRIGHT="Copyright (C) 2014-2024 Michiel Broek, All Rights Reserved" CYEARS="2014-2024" AC_SUBST(PACKAGE)
--- a/thermferm/one-wire.c Mon Apr 22 11:33:04 2024 +0200 +++ b/thermferm/one-wire.c Mon Apr 22 13:40:21 2024 +0200 @@ -62,7 +62,7 @@ payload = xstrcat(payload, (char *)"\",\"value\":"); snprintf(vbuf, 63, "%d", dev_w1->value); payload = xstrcat(payload, vbuf); - payload = xstrcat(payload, (char *)"\",\"timestamp\":"); + payload = xstrcat(payload, (char *)",\"timestamp\":"); snprintf(vbuf, 63, "%ld", (long)dev_w1->timestamp); payload = xstrcat(payload, vbuf); payload = xstrcat(payload, (char *)"}"); @@ -403,9 +403,9 @@ if ((fgets(buffer, 25, fp))) { sscanf(buffer, "%d", &value); if (cur_w1->value != value) { - dev_w1->timestamp = time(NULL); + cur_w1->timestamp = time(NULL); changed = true; -// syslog(LOG_NOTICE, "One-wire device %s temperature read %d => %d", cur_w1->address, cur_w1->value, value); + syslog(LOG_NOTICE, "One-wire device %s temperature read %d => %d", cur_w1->address, cur_w1->value, value); } cur_w1->value = value; /* devices.c will pick this up */ } else {