Add firmware Version to display
This commit is contained in:
parent
222aa46123
commit
f7a2a8a261
2 changed files with 12 additions and 2 deletions
|
@ -198,3 +198,11 @@ class Spi(object):
|
|||
while SPI_HEALTH:
|
||||
Spi.health_check()
|
||||
time.sleep(0.5)
|
||||
|
||||
@staticmethod
|
||||
def get_version():
|
||||
major = Spi.read(Register.IDENTIFICATION_MODEL_REV_MAJOR, 1)
|
||||
minor = Spi.read(Register.IDENTIFICATION_MODEL_REV_MINOR, 1)
|
||||
patch = Spi.read(Register.IDENTIFICATION_MODEL_REV_PATCH, 1)
|
||||
|
||||
return f"{major}.{minor}.{patch}"
|
||||
|
|
Reference in a new issue