198 lines
4.6 KiB
Plaintext
198 lines
4.6 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"id": "initial_id",
|
|
"metadata": {
|
|
"collapsed": true,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-09T12:51:54.082310200Z",
|
|
"start_time": "2023-11-09T12:51:54.066925300Z"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"send_data = [\n",
|
|
"0x55,\n",
|
|
"0x02,\n",
|
|
"0x91, 0xbb]\n",
|
|
"# down_center, # 底部色块中心是否在中点附近#底部色块十字路口\n",
|
|
"# 1 if state_crossing else 0, #是否越障\n",
|
|
"# get_symbol(deflection_angle), # 偏航角符号 print输出是43 + 45- +向左转调整 -向右转调整\n",
|
|
"# abs(int(deflection_angle)), # 偏航角\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"b'U\\x02\\x91\\xbb'\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(bytes(send_data))"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-09T12:52:16.024795100Z",
|
|
"start_time": "2023-11-09T12:52:16.009288700Z"
|
|
}
|
|
},
|
|
"id": "280bee89a348be16"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"b'U'\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(bytes([0x55]))"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-09T13:07:01.163036100Z",
|
|
"start_time": "2023-11-09T13:07:01.139125900Z"
|
|
}
|
|
},
|
|
"id": "90e3ee3a7b02b5bb"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": "b'\\x02'"
|
|
},
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"bytes([0x02])"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-09T13:08:24.303400500Z",
|
|
"start_time": "2023-11-09T13:08:24.240950700Z"
|
|
}
|
|
},
|
|
"id": "9fb065575546f122"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"b'3'\n",
|
|
"b'#'\n",
|
|
"b'\\xe8\\xbd\\xa6'\n",
|
|
"b'\\xe5\\xba\\x93'\n",
|
|
"b'/'\n",
|
|
"b'0'\n",
|
|
"b'x'\n",
|
|
"b'1'\n",
|
|
"b'2'\n",
|
|
"b','\n",
|
|
"b'0'\n",
|
|
"b'x'\n",
|
|
"b'3'\n",
|
|
"b'5'\n",
|
|
"b','\n",
|
|
"b'0'\n",
|
|
"b'x'\n",
|
|
"b'4'\n",
|
|
"b'8'\n",
|
|
"b','\n",
|
|
"b'0'\n",
|
|
"b'x'\n",
|
|
"b'6'\n",
|
|
"b'3'\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for qrdata in \"3#车库/0x12,0x35,0x48,0x63\":\n",
|
|
" print(qrdata.encode('utf-8'))\n",
|
|
" # print(bytes([ord(qrdata)]))\n",
|
|
" # print(bytes(qrdata.encode('utf-8')))"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-09T13:11:12.029582400Z",
|
|
"start_time": "2023-11-09T13:11:12.011583100Z"
|
|
}
|
|
},
|
|
"id": "102deceb5aba8783"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": "['__doc__',\n '__loader__',\n '__name__',\n '__package__',\n '__spec__',\n 'acos',\n 'acosh',\n 'asin',\n 'asinh',\n 'atan',\n 'atan2',\n 'atanh',\n 'ceil',\n 'comb',\n 'copysign',\n 'cos',\n 'cosh',\n 'degrees',\n 'dist',\n 'e',\n 'erf',\n 'erfc',\n 'exp',\n 'expm1',\n 'fabs',\n 'factorial',\n 'floor',\n 'fmod',\n 'frexp',\n 'fsum',\n 'gamma',\n 'gcd',\n 'hypot',\n 'inf',\n 'isclose',\n 'isfinite',\n 'isinf',\n 'isnan',\n 'isqrt',\n 'lcm',\n 'ldexp',\n 'lgamma',\n 'log',\n 'log10',\n 'log1p',\n 'log2',\n 'modf',\n 'nan',\n 'nextafter',\n 'perm',\n 'pi',\n 'pow',\n 'prod',\n 'radians',\n 'remainder',\n 'sin',\n 'sinh',\n 'sqrt',\n 'tan',\n 'tanh',\n 'tau',\n 'trunc',\n 'ulp']"
|
|
},
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"import math\n",
|
|
"dir(math)"
|
|
],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2023-11-10T08:19:18.288604200Z",
|
|
"start_time": "2023-11-10T08:19:18.257339300Z"
|
|
}
|
|
},
|
|
"id": "f5353c1dc69db52a"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 2
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython2",
|
|
"version": "2.7.6"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|