Update power unit

This commit is contained in:
Loïc Guégan 2024-03-11 15:47:17 +01:00
parent 8c9b6ddbba
commit 55cf801ef5

View file

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