*Strong Bad and The Cheat walk away*
This commit is contained in:
parent
48821a9027
commit
0eef3f80fd
1 changed files with 15 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue