diff --git a/src/publisher.c b/src/publisher.c index ce6df70..ce6a022 100644 --- a/src/publisher.c +++ b/src/publisher.c @@ -128,8 +128,8 @@ int main(int argc, char *argv[]) { printf( "Too many measurements to publish. Please increase ZMQ_MSG_SIZE\n"); } else { - sprintf(queues[queue_id].msg + queues[queue_id].size, "%ld,%ld,%d\n", - power_ts.tv_sec, power_ts.tv_nsec, atoi(buffer)); + sprintf(queues[queue_id].msg + queues[queue_id].size, "%ld,%ld,%f\n", + power_ts.tv_sec, power_ts.tv_nsec, atof(buffer)); queues[queue_id].size += strlen(queues[queue_id].msg + queues[queue_id].size); }