From e0a4f341e55a375672d540ea61effefe2c1eaf31 Mon Sep 17 00:00:00 2001 From: apoc4lyps Date: Wed, 18 Feb 2015 08:24:42 +0100 Subject: [PATCH] added statusbyte converter to lib/tools.py --- lib/tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tools.py b/lib/tools.py index f617cac6..16699ef2 100755 --- a/lib/tools.py +++ b/lib/tools.py @@ -93,5 +93,8 @@ def rel2abs(self, t, rf): rhov = 100000 / (287.0 * (1 - mix) + 462.0 * mix) / t return mix * rhov * 1000 + def statusbyte(self, x, n): + return x & 2**n != 0 + def runtime(self): return datetime.datetime.now() - self._start