Exemple #1
0
def get_clock() -> int:
    return int(utils.call_cmd(MEASURE_CLOCK)) // CLOCK_DIVISOR
Exemple #2
0
def get_voltage() -> float:
    return float(utils.call_cmd(MEASURE_VOLTS).split(MEASURE_VOLTS_SPLIT)[0])
Exemple #3
0
def test_call_cmd(test_input, expected, mocker):
    mocker.patch("subprocess.check_output", return_value=test_input)
    assert utils.call_cmd("") == expected
Exemple #4
0
def get_temperature() -> float:
    return float(utils.call_cmd(MEASURE_TEMP).split(MEASURE_TEMP_SPLIT)[0])
Exemple #5
0
def _get_raw_value() -> int:
    return int(utils.call_cmd(GET_THROTTLED), 0)