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

Method __init__

pager/pager_menu.py:128–141  ·  view source on GitHub ↗
(self, interfaces)

Source from the content-addressed store, hash-verified

126 """Graphical startup menu for Ragnar on the Pager LCD."""
127
128 def __init__(self, interfaces):
129 self.interfaces = interfaces
130 self.scan_prefix = 24
131 try:
132 config_path = os.path.join(PAYLOAD_DIR, 'config', 'shared_config.json')
133 with open(config_path, 'r') as f:
134 cfg = json.load(f)
135 self.scan_prefix = cfg.get('scan_network_prefix', 24)
136 except Exception:
137 pass
138 self.gfx = Pager()
139 self.gfx.init()
140 self.gfx.set_rotation(270) # Landscape 480x222
141 self.gfx.clear_input_events() # Flush stale events from service takeover
142
143 def cleanup(self):
144 if hasattr(self, 'gfx'):

Callers

nothing calls this directly

Calls 5

PagerClass · 0.90
getMethod · 0.45
initMethod · 0.45
set_rotationMethod · 0.45
clear_input_eventsMethod · 0.45

Tested by

no test coverage detected