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); }