Beispiel #1
0
def test_value_encode():
    m = mt.GoToMount()
    inp = 8120368
    out = '30E87B'

    a_d = m._encode(inp)
    assert a_d == out
Beispiel #2
0
def test_relative_movement():
    m = mt.GoToMount()
    target = 10  # degrees
    m.move_relative(val=target, axis=m.DEC_CHANNEL, use_degrees=True)
    while m.is_moving:
        time.sleep(.1)
    m.move_relative(val=-target, axis=m.DEC_CHANNEL, use_degrees=True)
Beispiel #3
0
def test_move():
    m = mt.GoToMount()
    m.move_relative(val=20, axis=m.RA_CHANNEL, use_degrees=True)
    assert m.is_moving
    m.stop(m.RA_CHANNEL)
    time.sleep(.1)
    assert not m.is_moving
Beispiel #4
0
def test_value_decode():
    m = mt.GoToMount()

    out = 8120368
    inp = b'30E87B'

    b_d = m._decode(inp)
    assert b_d == out
Beispiel #5
0
def test_set_wifi_info():
    m = mt.GoToMount(ip_address="192.168.43.141")
    # ret = m.set_wifi(ssid="jgwifi", password="******")
    ret = m.set_wifi(ssid="CenturyLink6635", password="******")
    assert ret == 'j'
Beispiel #6
0
def test_get_wifi_info():
    m = mt.GoToMount()
    assert (bytes(m.CMDS['get_wifi_info'],
                  encoding='ascii').hex() == '41542b43574a41505f4445463f0d0a')
    ret = m.get_wifi()
    assert ret == 'j'
Beispiel #7
0
def test_target_setting():
    m = mt.GoToMount()
    target = 41276
    m._set_move_target(target=target, axis=m.RA_CHANNEL)
    ra, dec = m.target
    assert target == ra
Beispiel #8
0
def test_position():
    m = mt.GoToMount()
    a = m.position
    print(a)
Beispiel #9
0
def test_position_change():
    m = mt.GoToMount()
    m.move(0, 1)
    m._stream_position(10)
    m.stop(1)
Beispiel #10
0
def test_get_stats():
    m = mt.GoToMount()
    print(m.is_moving)
Beispiel #11
0
def test_get_steps_per_deg():
    m = mt.GoToMount()
    a = m.steps_per_deg
    print(a)