add a lot of current stuff
this is not (yet) in the frm2 repo Change-Id: Ia5b2996803c3dbb15b85ab1bc3a24717ac6297fb
This commit is contained in:
@@ -247,3 +247,14 @@ def getfqdn(name=''):
|
||||
|
||||
def getGeneralConfig():
|
||||
return CONFIG
|
||||
|
||||
|
||||
def formatStatusBits(sword, labels, start=0):
|
||||
"""Return a list of labels according to bit state in `sword` starting
|
||||
with bit `start` and the first label in `labels`.
|
||||
"""
|
||||
result = []
|
||||
for i, lbl in enumerate(labels, start):
|
||||
if sword & (1 << i) and lbl:
|
||||
result.append(lbl)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user