diff --git a/config/config.json b/config/config.json index 24e111e2..cdf38aa2 100644 --- a/config/config.json +++ b/config/config.json @@ -8,28 +8,27 @@ "display": { "hardware": { "rows": 32, - "cols": 64, + "cols": 32, "chain_length": 2, "parallel": 1, "brightness": 50, "hardware_mapping": "adafruit-hat-pwm", "scan_mode": "progressive", "pwm_bits": 11, - "pwm_dither_bits": 0, + "pwm_dither_bits": 2, "pwm_lsb_nanoseconds": 130, "led_rgb_sequence": "RGB", - "pixel_mapper_config": "U-mapper", - "panel_type": "", + "pixel_mapper_config": "U-mapper;Rotate:180", + "panel_type": "FM6126A", "row_addr_type": 0, "multiplexing": 0, "disable_hardware_pulsing": true, "inverse_colors": false, "show_refresh_rate": false, - "limit_refresh_rate_hz": 100, - "rotation": 180 + "limit_refresh_rate_hz": 120 }, "runtime": { - "gpio_slowdown": 2 + "gpio_slowdown": 4 }, "rotation_interval": 10 }, diff --git a/src/display_manager.py b/src/display_manager.py index c556d6a4..8b36421b 100644 --- a/src/display_manager.py +++ b/src/display_manager.py @@ -66,17 +66,7 @@ class DisplayManager: logger.info("Display rotation set to: %d degrees", self.rotation) def _draw_text(self, text, x, y, font, color=(255, 255, 255)): - """Draw text on the canvas with optional rotation.""" - if self.rotation == 180: - # For 180 degree rotation, flip coordinates - width = self.matrix.width - height = self.matrix.height - # Get text size for proper positioning - text_width, text_height = font.getsize(text) - # Adjust coordinates for rotation - x = width - x - text_width - y = height - y - text_height - + """Draw text on the canvas.""" self.draw.text((x, y), text, font=font, fill=color) self.matrix.SetImage(self.image)