diff --git a/board/safety.h b/board/safety.h index 98b4f66f6..3afb39cb1 100644 --- a/board/safety.h +++ b/board/safety.h @@ -166,7 +166,8 @@ void update_sample(struct sample_t *sample, int sample_new) { sample->values[0] = sample_new; // get the minimum and maximum measured samples - sample->min = sample->max = sample->values[0]; + sample->min = sample->values[0]; + sample->max = sample->values[0]; for (int i = 1; i < sizeof(sample->values)/sizeof(sample->values[0]); i++) { if (sample->values[i] < sample->min) { sample->min = sample->values[i];