{"id":22691868,"url":"https://github.com/cmst0us/cybergearkit","last_synced_at":"2025-08-27T04:03:41.199Z","repository":{"id":192440100,"uuid":"686403176","full_name":"CmST0us/CyberGearKit","owner":"CmST0us","description":"CyberGearKit is a framework of communicating to xiaomi CyberGear.","archived":false,"fork":false,"pushed_at":"2023-09-10T06:45:45.000Z","size":73,"stargazers_count":42,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T06:38:40.320Z","etag":null,"topics":["canfd","cybergear","linux","swift","xiaomi"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CmST0us.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-02T17:12:02.000Z","updated_at":"2025-03-12T19:03:47.000Z","dependencies_parsed_at":"2024-12-10T01:12:52.246Z","dependency_job_id":"37126ddf-d463-46ec-acb3-3ff32b273a94","html_url":"https://github.com/CmST0us/CyberGearKit","commit_stats":null,"previous_names":["cmst0us/cybergearkit"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/CmST0us/CyberGearKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CmST0us%2FCyberGearKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CmST0us%2FCyberGearKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CmST0us%2FCyberGearKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CmST0us%2FCyberGearKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CmST0us","download_url":"https://codeload.github.com/CmST0us/CyberGearKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CmST0us%2FCyberGearKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272288926,"owners_count":24907776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canfd","cybergear","linux","swift","xiaomi"],"created_at":"2024-12-10T01:12:43.122Z","updated_at":"2025-08-27T04:03:41.082Z","avatar_url":"https://github.com/CmST0us.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CyberGearKit\n\n![logo](Asset/logo.svg)\n\nCyberGearKit is a framework of communicating to xiaomi CyberGear.\n\n\n# How to integrate\n\nThis is an SPM-compliant Swift Package: First, add the following line in Package.swift to your package dependencies:\n\n```swift\n.package(url: \"https://github.com/CmST0us/CyberGearKit.git\", branch: \"master\")\n```\nThen, add the module CyberGearKit – where necessary – to your target dependencies.\n\n# Usage\n\nCreate `CyberGear.CANBus` to communicate with socketcan interface\n\n```swift\nlet canBus = CyberGear.CANBus(hostID: 1)\ndo {\n    try canBus.open()\n} catch {\n    // do some catch\n}\n```\n\nCreate `CyberGear.Motor` to control motor. For example, you can make motor run in speed mode.\n\n```swift\nlet motor = CyberGear.Motor(canID: 127, bus: canBus)\ntry! motor.runMode(.speed)\ntry! motor.enable()\ntry! motor.setTargetSpeed(5)\n```\n\nUse `RxSwift` to listen frame parse\n\n```swift\nlet disposeBag = DisposeBag()\nmotor.motorStaus\n    .observe(on: MainScheduler.asyncInstance)\n    .subscribe { (v: CyberGearKit.CyberGear.Frame.MotorStatus) in\n        // do some thing\n    }\n    .disposed(by: disposeBag)\n```\n\n# License and Contributions\nThis package is licensed under the term of the MIT License. Contributions are always welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmst0us%2Fcybergearkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmst0us%2Fcybergearkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmst0us%2Fcybergearkit/lists"}