*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 y,
|
||||||
double width,
|
double width,
|
||||||
double height) {
|
double height) {
|
||||||
static double rpm = 0;
|
switch (frame->can_id) {
|
||||||
|
case 0x280: {
|
||||||
if (frame->can_id == 0x280) {
|
static double rpm = 0;
|
||||||
rpm = 0.25 * (double)(frame->data[2] | (frame->data[3] << 8));
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_tachometer_needle(cr,
|
rpm = 0.25 * (double)(frame->data[2] | (frame->data[3] << 8));
|
||||||
x + width * 0.2,
|
|
||||||
y + height * 0.5,
|
draw_tachometer_needle(cr,
|
||||||
height * 0.4,
|
x + width * 0.2,
|
||||||
rpm);
|
y + height * 0.5,
|
||||||
|
height * 0.4,
|
||||||
|
rpm);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
@ -273,7 +275,7 @@ int main(int argc, char **argv) {
|
||||||
hexagram_window_refresh_bg(window);
|
hexagram_window_refresh_bg(window);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue