{"id":19201445,"url":"https://github.com/padcom/node-mavlink-heartbeat","last_synced_at":"2025-10-10T23:19:19.520Z","repository":{"id":155668847,"uuid":"632699330","full_name":"padcom/node-mavlink-heartbeat","owner":"padcom","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-26T01:08:24.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T23:19:15.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/padcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-26T00:29:19.000Z","updated_at":"2024-08-16T13:13:08.000Z","dependencies_parsed_at":"2023-09-05T17:18:04.415Z","dependency_job_id":null,"html_url":"https://github.com/padcom/node-mavlink-heartbeat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/padcom/node-mavlink-heartbeat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padcom%2Fnode-mavlink-heartbeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padcom%2Fnode-mavlink-heartbeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padcom%2Fnode-mavlink-heartbeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padcom%2Fnode-mavlink-heartbeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/padcom","download_url":"https://codeload.github.com/padcom/node-mavlink-heartbeat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padcom%2Fnode-mavlink-heartbeat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005552,"owners_count":26083918,"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-10-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-11-09T12:38:47.594Z","updated_at":"2025-10-10T23:19:19.457Z","avatar_url":"https://github.com/padcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heartbeat scheduler and receiver for node-mavlink\n\nSending and receiving heartbeats is really a basic thing. It shouldn't have to be written per project.\nThis is why the `node-mavlink-heartbeat` package has been created. In a simple and effective way it allows the developer to concentrate on what is important and not what is just noise.\n\n## Installation\n\nTo install the package issue the following command:\n\n```bash\n$ npm install --save node-mavlink-heartbeat\n```\n\n## Usage\n\nThere are 2 birds that you'll be able to kill with one stone, so to speak. That's because the same instance of `Heartbeat` can serve as both the receiver, sender and scheduler of sending heartbeat packets.\n\nFor a comprehensive example please see `examples/simple.ts`\n\n```typescript\nconst port = new SerialPort({ path: '/dev/ttyACM0', baudRate: 115200 })\nconst heartbeat = new Heartbeat(port)\nheartbeat.on('heartbeat', ({ packet, heartbeat }: HeartbeatData) =\u003e {\n  // do something with the packet\n  console.log(packet.debug())\n  // or with the typed heartbeat packet\n  console.log(heartbeat.baseMode)\n})\n\nport\n  .pipe(new MavLinkPacketSplitter())\n  .pipe(new MavLinkPacketParser())\n  .pipe(heartbeat)\n  .resume()\n\n// Wait for the drone to give us a sign it's alive\n// That way we know for sure the connection is ready.\nawait heartbeat.waitForOne()\n\n// send a single heartbeat\nawait heartbeat.send()\n// start sending heartbeats\nheartbeat.start()\n// stop sending heartbeats\nheartbeat.stop()\n```\n\nHappy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadcom%2Fnode-mavlink-heartbeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpadcom%2Fnode-mavlink-heartbeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadcom%2Fnode-mavlink-heartbeat/lists"}