diff options
-rw-r--r-- | remote_plot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/remote_plot.c b/remote_plot.c index 148fc33..9962281 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -438,7 +438,7 @@ static gboolean read_data(gpointer user_data) for(int i=0;i<VOLTLEN;i++) { - printf("volt[%d]: %g\n",i,data->cans.end->item.volt[i]); + //printf("volt[%d]: %g\n",i,data->cans.end->item.volt[i]); sum+=data->cans.end->item.volt[i]; if(i>0) { @@ -449,12 +449,12 @@ static gboolean read_data(gpointer user_data) } } avg=sum/VOLTLEN; - sprintf(str,"min/avg/max voltage: %6.4f/%.0f/%6.4f V",vmin,avg,vmax); + sprintf(str,"min/avg/max voltage: %6.4f/%6.4f/%6.4f V",vmin,avg,vmax); gtk_label_set_text(GTK_LABEL(data->volt_label),str); sum=0; for(int i=0;i<TEMPLEN;i++) { - printf("temp[%d]: %hhu\n",i,data->cans.end->item.temp[i]); + //printf("temp[%d]: %hhu\n",i,data->cans.end->item.temp[i]); sum+=data->cans.end->item.temp[i]; if(i>0) { @@ -465,7 +465,7 @@ static gboolean read_data(gpointer user_data) } } avg=sum/TEMPLEN; - sprintf(str,"min/avg/max temperature: %3hhu/%.1f/%3hhu C",tmin,avg,tmax); + sprintf(str,"min/avg/max temperature: %3hhu/%.0f/%3hhu C",tmin,avg,tmax); gtk_label_set_text(GTK_LABEL(data->temp_label),str); new_entry=false; gtk_widget_queue_draw(data->area); |