

@classmethod
def display(klass, unit, val):
    assert (unit in ['mmol/L', 'mg/dL'])
    if (unit == 'mg/dL'):
        return int(round(val))
    elif (unit == 'mmol/L'):
        return round(val, 1)

dataset/ETHPy150Open openaps/openaps/openaps/glucose/display.py Display.display/original