aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote_plot.c13
1 files changed, 12 insertions, 1 deletions
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;j<LEN;j++)
{
if(i<VOLTLEN)
+ {
+ // according to .dbc file
+ ymin=0;
+ ymax=6.;
y[j]=data->volt[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.