X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=power%2Fdaemon%2Fburrow-powerd.c;h=ad34efbea551c7405d224370ec048b265354bc2e;hb=a9d52ef421c6de4507ec8d294665e55fc83bfe49;hp=0238218f3c9d650ab92f4625252a7dce6e5bb6e8;hpb=dfdb0e8d42049d8b0ad82dd867984ffb31124cde;p=home-hw.git diff --git a/power/daemon/burrow-powerd.c b/power/daemon/burrow-powerd.c index 0238218..ad34efb 100644 --- a/power/daemon/burrow-powerd.c +++ b/power/daemon/burrow-powerd.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -56,7 +57,7 @@ static void mqtt_publish(const char *topic, const char *fmt, ...) va_end(args); } -static void mqtt_log_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int level, const char *message) +static void mqtt_log_callback(struct mosquitto *mosq UNUSED, void *obj UNUSED, int level UNUSED, const char *message UNUSED) { // msg(L_INFO, "MQTT(%d): %s", level, message); } @@ -139,13 +140,14 @@ static bool mb_connect(void) } mb_is_open = true; + return true; } /*** Main loop ***/ static u16 mb_regs[22]; -s32 get_s32(uint i) +static s32 get_s32(uint i) { if (mb_regs[i+1] < 0x8000) return (mb_regs[i+1] << 16) | mb_regs[i];