Use float for power

This commit is contained in:
Loic Guegan 2023-08-11 12:26:54 +02:00
parent e0eca2e664
commit f68447e201

View file

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