diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2024-03-11 15:47:17 +0100 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2024-03-11 15:47:17 +0100 |
| commit | 55cf801ef5a46bff37219afe3ad3e16281e0bb03 (patch) | |
| tree | ea985aa8cce28ad5d4e78ceb9c9849b5f0e5f877 | |
| parent | 8c9b6ddbba393d2fe404c4eaaaed8281f1935a00 (diff) | |
Update power unit
| -rw-r--r-- | src/publisher.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |
