ArduPilot / node-mavlink

This project is providing native TypeScript bindings and tools for sending and receiving MavLink messages over a verity of medium
GNU Lesser General Public License v3.0
75 stars 25 forks source link

mavlink typescript error #34

Closed jhong-sync closed 8 months ago

jhong-sync commented 8 months ago

import { MAVLinkMessage } from 'node-mavlink; Module '"node-mavlink"' has no exported member 'MAVLinkMessage'.ts(2305)

In message-registry.ts, import MAVLinkMessage but node-mavlink library has no such memeber. How to fix this situation?

Thanks!!

padcom commented 8 months ago

There is no such thing as MAVLinkMessage in this project, nor in the mavlink-mappings. Do you mind explaining how did you arrive at this problem?

jhong-sync commented 8 months ago

@padcom Thank you for your support! First I followed instruction of this mavlink website. (https://mavlink.io/en/getting_started/generate_libraries.html) And then I chose all.xml, typscript, 2.0 -> generate

image

So the result of generation was below picture.

image

And in message-registry.ts, I found import {MAVLinkMessage} from 'node-mavlink';

image

This is how I got that code. If I had mistake let me know what I did wrong!

Thank you so much for your effort.

padcom commented 8 months ago

You're using the wrong library. Here are the instructions you're looking for:

https://github.com/ArduPilot/node-mavlink?tab=readme-ov-file#getting-started