# PyPTZController - 一个简单的 Pelco-D 云台控制库
<!-- 这是一个简短的描述,说明这个库是做什么的 -->
这是一个基于 Python 的、用于通过串口 (RS-485) 控制遵循 Pelco-D 协议的云台 (PTZ) 摄像头的库。它将复杂的十六进制指令封装成了简单易用的 Python 方法。
## 主要功能
- **基础移动**: 支持上、下、左、右等八个方向的持续移动。
- **预置位**: 支持设置、调用和清除预置位。
- **绝对定位**: 可以直接移动到指定的水平和垂直角度。
- **位置查询**: 能够查询云台当前的精确角度。
- **精确移动**: 提供了一个“移动并等待到达”的高级方法,实现精确的闭环控制。
- **协议驱动**: 通过配置文件定义协议,易于扩展。
## 安装
你可以通过 pip 轻松安装本库:
```bash
pip install pyptzcontroller
Raw data
{
"_id": null,
"home_page": null,
"name": "pyptzcontroller",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ptz, pelco-d, serial control, camera control, rs485",
"author": null,
"author_email": "yuyu <jin2686641273@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/0f/ee/bf1ad8ba91c7f8e9c4973f7eba754be653406213c1a6452cf757651b0b0b/pyptzcontroller-0.1.2.tar.gz",
"platform": null,
"description": "# PyPTZController - \u4e00\u4e2a\u7b80\u5355\u7684 Pelco-D \u4e91\u53f0\u63a7\u5236\u5e93\r\n\r\n<!-- \u8fd9\u662f\u4e00\u4e2a\u7b80\u77ed\u7684\u63cf\u8ff0\uff0c\u8bf4\u660e\u8fd9\u4e2a\u5e93\u662f\u505a\u4ec0\u4e48\u7684 -->\r\n\u8fd9\u662f\u4e00\u4e2a\u57fa\u4e8e Python \u7684\u3001\u7528\u4e8e\u901a\u8fc7\u4e32\u53e3 (RS-485) \u63a7\u5236\u9075\u5faa Pelco-D \u534f\u8bae\u7684\u4e91\u53f0 (PTZ) \u6444\u50cf\u5934\u7684\u5e93\u3002\u5b83\u5c06\u590d\u6742\u7684\u5341\u516d\u8fdb\u5236\u6307\u4ee4\u5c01\u88c5\u6210\u4e86\u7b80\u5355\u6613\u7528\u7684 Python \u65b9\u6cd5\u3002\r\n\r\n## \u4e3b\u8981\u529f\u80fd\r\n\r\n- **\u57fa\u7840\u79fb\u52a8**: \u652f\u6301\u4e0a\u3001\u4e0b\u3001\u5de6\u3001\u53f3\u7b49\u516b\u4e2a\u65b9\u5411\u7684\u6301\u7eed\u79fb\u52a8\u3002\r\n- **\u9884\u7f6e\u4f4d**: \u652f\u6301\u8bbe\u7f6e\u3001\u8c03\u7528\u548c\u6e05\u9664\u9884\u7f6e\u4f4d\u3002\r\n- **\u7edd\u5bf9\u5b9a\u4f4d**: \u53ef\u4ee5\u76f4\u63a5\u79fb\u52a8\u5230\u6307\u5b9a\u7684\u6c34\u5e73\u548c\u5782\u76f4\u89d2\u5ea6\u3002\r\n- **\u4f4d\u7f6e\u67e5\u8be2**: \u80fd\u591f\u67e5\u8be2\u4e91\u53f0\u5f53\u524d\u7684\u7cbe\u786e\u89d2\u5ea6\u3002\r\n- **\u7cbe\u786e\u79fb\u52a8**: \u63d0\u4f9b\u4e86\u4e00\u4e2a\u201c\u79fb\u52a8\u5e76\u7b49\u5f85\u5230\u8fbe\u201d\u7684\u9ad8\u7ea7\u65b9\u6cd5\uff0c\u5b9e\u73b0\u7cbe\u786e\u7684\u95ed\u73af\u63a7\u5236\u3002\r\n- **\u534f\u8bae\u9a71\u52a8**: \u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u5b9a\u4e49\u534f\u8bae\uff0c\u6613\u4e8e\u6269\u5c55\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n\u4f60\u53ef\u4ee5\u901a\u8fc7 pip \u8f7b\u677e\u5b89\u88c5\u672c\u5e93\uff1a\r\n\r\n```bash\r\npip install pyptzcontroller\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "\u4e00\u4e2a\u7b80\u5355\u6613\u7528\u7684 Pelco-D \u534f\u8bae\u4e91\u53f0\u63a7\u5236\u5e93",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"ptz",
" pelco-d",
" serial control",
" camera control",
" rs485"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "42089bea993b6bcf7a0f83dfb545a9eb1a7e3750905c2bae1e3449c14998ed4e",
"md5": "785c4f02eb031eca3f6bc07d4689c57a",
"sha256": "4170fca7406bfbaaed1afc508a2047073fc1198c04a8277e4fd7e626b716b560"
},
"downloads": -1,
"filename": "pyptzcontroller-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "785c4f02eb031eca3f6bc07d4689c57a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 8381,
"upload_time": "2025-08-15T09:20:08",
"upload_time_iso_8601": "2025-08-15T09:20:08.794075Z",
"url": "https://files.pythonhosted.org/packages/42/08/9bea993b6bcf7a0f83dfb545a9eb1a7e3750905c2bae1e3449c14998ed4e/pyptzcontroller-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0feebf1ad8ba91c7f8e9c4973f7eba754be653406213c1a6452cf757651b0b0b",
"md5": "1e73db41c332a8fa68bfcc29228d5eb2",
"sha256": "dd93fdd98caa4fbe53d5a30ad18d44eb823b9f63c9d45d550b31d4f7cd9059d0"
},
"downloads": -1,
"filename": "pyptzcontroller-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1e73db41c332a8fa68bfcc29228d5eb2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8452,
"upload_time": "2025-08-15T09:20:11",
"upload_time_iso_8601": "2025-08-15T09:20:11.383757Z",
"url": "https://files.pythonhosted.org/packages/0f/ee/bf1ad8ba91c7f8e9c4973f7eba754be653406213c1a6452cf757651b0b0b/pyptzcontroller-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-15 09:20:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pyptzcontroller"
}