def _printError(error):
msg = "Unknown error occured."
if error == RETURN_CODES.ERROR_SIZE:
msg = "Data packet size incorrect."
elif error == RETURN_CODES.ERROR_UNSUPPORTED:
msg = "Unsupported configuration attempted."
elif error == RETURN_CODES.ERROR_BAD_CMD:
msg = "Unsupported protocol command. Check your device version."
log.error("%s: %s", error, msg)
raise SerialPadError(msg)
评论列表
文章目录