I have checked the tmc.py file, can't see anything different to other function. RPC 2019 as per geocom manual.
Possible bug with geocom or it's documentation?
Is it possible to insert code to print every geocom ascii call and response. Or log it?
import argparse
import time
from geocompy import open_serial, GeoCom, GeoComCode
def tests(tps: GeoCom) -> None:
resp= tps.tmc.get_angle()
print("get_angle >",GeoComCode(resp.error).value, " ", GeoComCode(resp.error).name," ",resp.params)
resp= tps.tmc.do_measurement()
print("do_measurement >",GeoComCode(resp.error).value, " ", GeoComCode(resp.error).name," ",resp.params)
resp= tps.tmc.get_complete_measurement()
print("get_simple_measurement >",GeoComCode(resp.error).value, " ", GeoComCode(resp.error).name," ",resp.params)
resp= tps.tmc.set_manual_distance(2.0,0.0)
print("set_manual_distance >",GeoComCode(resp.error).value, " ", GeoComCode(resp.error).name," ",resp.params)
if __name__ == "__main__":
with open_serial(
'COM4',
speed=115200,
timeout=10
) as com:
tps = GeoCom(com)
tests(tps)
do_measurement > 0 OK None
get_simple_measurement > 0 OK (Angle(224-05-31), Angle(89-52-57), 1.505510106608663)
set_manual_distance > 3081 COM_PROC_UNAVAIL None
I have checked the tmc.py file, can't see anything different to other function. RPC 2019 as per geocom manual.
Possible bug with geocom or it's documentation?
Is it possible to insert code to print every geocom ascii call and response. Or log it?