MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / get_version

Function get_version

python/inputmodule/inputmodule/__init__.py:109–120  ·  view source on GitHub ↗

Get the device's firmware version

(dev)

Source from the content-addressed store, hash-verified

107
108
109def get_version(dev):
110 """Get the device's firmware version"""
111 res = send_command(dev, CommandVals.Version, with_response=True)
112 major = res[0]
113 minor = (res[1] & 0xF0) >> 4
114 patch = res[1] & 0xF
115 pre_release = res[2]
116
117 version = f"{major}.{minor}.{patch}"
118 if pre_release:
119 version += " (Pre-release)"
120 return version
121
122
123def send_command(dev, command, parameters=[], with_response=False):

Callers 2

main_cliFunction · 0.90
run_guiFunction · 0.90

Calls 1

send_commandFunction · 0.85

Tested by

no test coverage detected