コード例 #1
0
def test_set_jc_mode():
    # Load JetsonClocks controller
    jc = JetsonClocks()
    jc.start = True
    # Initialize NVPmodel
    nvp = NVPmodel("PC", jetson_clocks=jc)
    # Set value
    set_status = nvp.set(0)
    # stop jc
    jc.start = False
    assert set_status
コード例 #2
0
ファイル: test_nvpmodel.py プロジェクト: z14git/jetson_stats
def test_set_jc_mode():
    # Load JetsonClocks controller
    jc = JetsonClocks(sys.prefix + "/local/jetson_stats")
    try:
        jc.start = True
    except JetsonClocks.JCException:
        pass
    # Initialize NVPmodel
    nvp = NVPmodel(jetson_clocks=jc)
    # Set value
    set_status = nvp.set(0)
    # stop jc
    try:
        jc.start = False
    except JetsonClocks.JCException:
        pass
    assert set_status