*Strong Bad and The Cheat walk away*

This commit is contained in:
XANTRONIX Development 2019-05-28 01:09:44 -05:00
parent 48821a9027
commit 0eef3f80fd

View file

@ -200,19 +200,21 @@ static void update_gauge_cluster(cairo_t *cr,
double y,
double width,
double height) {
static double rpm = 0;
switch (frame->can_id) {
case 0x280: {
static double rpm = 0;
if (frame->can_id == 0x280) {
rpm = 0.25 * (double)(frame->data[2] | (frame->data[3] << 8));
} else {
return;
rpm = 0.25 * (double)(frame->data[2] | (frame->data[3] << 8));
draw_tachometer_needle(cr,
x + width * 0.2,
y + height * 0.5,
height * 0.4,
rpm);
break;
}
}
draw_tachometer_needle(cr,
x + width * 0.2,
y + height * 0.5,
height * 0.4,
rpm);
}
int main(int argc, char **argv) {