from uf.wrapper.swift_api import SwiftAPI # Software License Agreement (BSD License) # # Copyright (c) 2017, UFactory, Inc. # All rights reserved. # # Author: Duke Fong <*****@*****.**> / Derwent <*****@*****.**> """ This utility prints EEPROM values used to callibrate the uArm's reverse kinematics. Is compatible with firmware version """ # logger_init(logging.VERBOSE) # logger_init(logging.DEBUG) logger_init(logging.INFO) def main(): print('setup swift ...') swift = SwiftAPI() sleep(2) print('device info: ') device_info = swift.get_device_info() print(device_info) print('firmware version:') fw_version = tuple(int(number) for number in device_info[2].split('.')) print(fw_version) fw_has_b_angles = (fw_version >= (3, 1, 16))
# # Copyright (c) 2017, UFactory, Inc. # All rights reserved. # # Author: Duke Fong <*****@*****.**> import sys, os from time import sleep sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from uf.ufc import ufc_init from uf.comm.serial_ascii import SerialAscii from uf.utils.log import logger_init, logging logger_init(logging.VERBOSE) print('setup ser_ascii ...') ser_iomap = {'out': 'ser_out', 'in': 'ser_in', 'service': 'ser_service'} ufc = ufc_init() ser_ascii = SerialAscii(ufc, 'ser_ascii', ser_iomap, filters={'hwid': 'USB VID:PID=2341:0042'}) print('setup test ...') logger = logging.getLogger('test')
from uf.wrapper.swift_api import SwiftAPI from utils.core import SIMPLE_RESPONSE_REGEX, TEMP_RESPONSE_REGEX, send_cmd_sync_ok # Software License Agreement (BSD License) # # Copyright (c) 2017, UFactory, Inc. # All rights reserved. # # Author: Derwent <*****@*****.**> """ This utility prints EEPROM values used to callibrate the uArm's reverse kinematics. Is compatible with firmware version """ # logger_init(logging.VERBOSE) logger_init(logging.DEBUG) # logger_init(logging.INFO) def main(): logging.info('setup swift ...') swift = SwiftAPI() sleep(2) logging.info('device info: ') device_info = swift.get_device_info() logging.info(device_info) logging.info('firmware version:') fw_version = tuple(int(number) for number in device_info[2].split('.')) logging.info(fw_version)