From f3d0fb2a307a16f3ab86bf8640e5db07e1588c34 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sat, 26 Apr 2025 16:31:37 -0700 Subject: guess temp min max --- remote_plot.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/remote_plot.c b/remote_plot.c index 0ef797b..cb2c1a2 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -386,7 +386,8 @@ static void draw_function (GtkDrawingArea *area, { //printf("draw begin\n"); DATA *data=user_data; - PLFLT xmin = data->t[0], xmax = data->t[LEN-1], ymin = 0, ymax = 6.; + PLFLT xmin = data->t[0], xmax = data->t[LEN-1]; + PLFLT ymin, ymax; int plot_counts=0; gboolean active_checkbutton[VOLTLEN+TEMPLEN]; @@ -429,9 +430,19 @@ static void draw_function (GtkDrawingArea *area, for(int j=0;jvolt[j][i]; + } else + { + // according to .dbc file + ymin=-50; + ymax=100; y[j]=data->temp[j][i-VOLTLEN]; + } } // Create a labelled box to hold the plot. -- cgit v1.2.3-70-g09d2