MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / save_gamification_data

Method save_gamification_data

shared.py:1249–1259  ·  view source on GitHub ↗

Persist gamification progress to disk.

(self)

Source from the content-addressed store, hash-verified

1247
1248 # Non-EPD displays (character LCDs and LED matrices) have no PIL buffer
1249 # interface — skip EPDHelper init entirely for these types.
1250 _NON_EPD_DISPLAYS = {"lcd1602", "max7219_4panel", "max7219_8panel"}
1251 epd_type_cfg = self.config.get("epd_type", DEFAULT_EPD_TYPE)
1252 if epd_type_cfg in _NON_EPD_DISPLAYS:
1253 profile = DISPLAY_PROFILES.get(epd_type_cfg, {})
1254 self.width = profile.get("ref_width", 16)
1255 self.height = profile.get("ref_height", 2)
1256 self.epd_helper = None
1257 self.screen_reversed = normalize_rotation(self.config.get("screen_reversed", 0))
1258 self.web_screen_reversed = 0
1259 self.apply_display_profile(epd_type_cfg)
1260 logger.info(
1261 f"Non-EPD display '{epd_type_cfg}' configured: {self.width}x{self.height}"
1262 " — skipping EPD buffer init"

Callers 2

update_statsMethod · 0.95

Calls 3

dumpMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected