From 55cf801ef5a46bff37219afe3ad3e16281e0bb03 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 11 Mar 2024 15:47:17 +0100 Subject: [PATCH] Update power unit --- src/publisher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/publisher.c b/src/publisher.c index c213c3c..77ccbc4 100644 --- a/src/publisher.c +++ b/src/publisher.c @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) { "Too many measurements to publish. Please increase ZMQ_MSG_SIZE\n"); } else { sprintf(queues[queue_id].msg + queues[queue_id].size, "%ld,%ld,%f\n", - power_ts.tv_sec, power_ts.tv_nsec, atof(buffer)); + power_ts.tv_sec, power_ts.tv_nsec, atof(buffer)/1000.0); // Power is in mW so convert it to watt queues[queue_id].size += strlen(queues[queue_id].msg + queues[queue_id].size); }