From bd6c5fe168308a2a1f7ca07a29c47f3f2237eb25 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 31 Dec 2023 21:57:38 -0500 Subject: [PATCH] Hey that looks pretty dope --- py/hexagram/dial.py | 2 +- py/hexagram/speedo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/py/hexagram/dial.py b/py/hexagram/dial.py index f37dd69..149ccd8 100644 --- a/py/hexagram/dial.py +++ b/py/hexagram/dial.py @@ -3,7 +3,7 @@ import cairo from hexagram.gauge import Gauge -ANGLE_OFFSET = 1.658 +ANGLE_OFFSET = math.pi / 2 class Dial(Gauge): __slots = 'x', 'y', 'radius', 'min_angle', 'max_angle', 'max_value', diff --git a/py/hexagram/speedo.py b/py/hexagram/speedo.py index 4656626..8394528 100644 --- a/py/hexagram/speedo.py +++ b/py/hexagram/speedo.py @@ -29,4 +29,4 @@ class Speedo(Dial): cr.set_source_rgb(1, 1, 1) for speed in range(0, int(self.max_value)+1, 20): - self.draw_number(cr, 0.75, speed, "%02d" % int(speed)) + self.draw_number(cr, 0.75, speed, "%d" % int(speed))