*drive-thru whale* Steve, drive around to the seventh window.

This commit is contained in:
XANTRONIX Development 2019-05-28 00:54:05 -05:00
parent 5e23676de9
commit ffbce9b670

View file

@ -201,11 +201,11 @@ static void draw_gauge_cluster_bg(hexagram_window *window,
} }
static void update_gauge_cluster(cairo_t *cr, static void update_gauge_cluster(cairo_t *cr,
struct can_frame *frame, struct can_frame *frame,
double x, double x,
double y, double y,
double width, double width,
double height) { double height) {
static double rpm = 0; static double rpm = 0;
if (frame->can_id == 0x280) { if (frame->can_id == 0x280) {
@ -232,7 +232,6 @@ int main(int argc, char **argv) {
width = 1024, width = 1024,
height = 480; height = 480;
cairo_surface_t *sfc;
cairo_t *cr; cairo_t *cr;
if ((can_if = hexagram_can_if_open("vcan0")) == NULL) if ((can_if = hexagram_can_if_open("vcan0")) == NULL)
@ -256,9 +255,7 @@ int main(int argc, char **argv) {
/* /*
* Set up the foreground surface * Set up the foreground surface
*/ */
sfc = window->surface_fg; cr = hexagram_window_create_fg_context(window);
cr = cairo_create(sfc);
/* /*
* Set up file descriptors to monitor * Set up file descriptors to monitor
@ -314,10 +311,7 @@ int main(int argc, char **argv) {
} }
} }
cairo_destroy(cr); hexagram_window_destroy(window);
cairo_surface_destroy(sfc);
XCloseDisplay(display);
return 0; return 0;
} }