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

Function _render_dimensions

display.py:41–50  ·  view source on GitHub ↗

Return (render_w, render_h) for the given rotation. For 90°/270° the render canvas is portrait (swapped) so that the e-paper getbuffer 'Vertical' path maps it correctly to the landscape display buffer. For 0°/180° dimensions stay as-is.

(width, height, rotation)

Source from the content-addressed store, hash-verified

39 e = str(err or '').lower()
40 if 'pyserial' in e:
41 return 'no pyserial'
42 # The radio check comes first: "this Huginn has no 802.15.4 radio" names a
43 # board that IS present, so it must not be reported as a missing one.
44 if '802.15.4' in e or 'not compiled' in e:
45 return 'no 15.4 rx'
46 if 'huginn' in e or 'companion' in e:
47 return 'no Huginn'
48 if 'busy' in e or 'in use' in e or 'permission' in e or 'cannot open' in e:
49 return 'port busy'
50 if 'controller' in e or 'adapter' in e or 'bluetoothd' in e or 'rfkill' in e:
51 return 'no adapter'
52 return str(err or 'failed')[:11]
53

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected