#!/usr/bin/python3 """ Retrieves the current UBX-CFG-RATE configuration (navigation rate) from the module """ import logging from ubxlib.server_tty import GnssUBlox from ubxlib.ubx_cfg_rate import UbxCfgRatePoll FORMAT = '%(asctime)-15s %(levelname)-8s %(message)s' logging.basicConfig(format=FORMAT) logger = logging.getLogger('ubxlib') logger.setLevel(logging.INFO) ubx = GnssUBlox('/dev/ttyUSB1') ubx.setup() poll_msg = UbxCfgRatePoll() response = ubx.poll(poll_msg) print(response) ubx.cleanup()