How can I use the c_library_v2 (https://github.com/mavlink/c_library_v2)? It seems that it doesn't include the "mavlink.h" file directly when I import it to my Arduino project.
I have downloaded the library and included it with the predefined option in the Arduino IDE, bu I always get the same error:
I am using the PX4
autopilot.
Best regards
You need to create a header file lets say "mavlinkv2.h" in the root folder /mavlink and that one should look like that:#ifndef MAVLINK_H
#define MAVLINK_H
#ifndef MAVLINK_STX
#define MAVLINK_STX 254
#endif
#ifndef MAVLINK_ENDIAN
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
#endif
#ifndef MAVLINK_ALIGNED_FIELDS
#define MAVLINK_ALIGNED_FIELDS 1
#endif
#ifndef MAVLINK_CRC_EXTRA
#define MAVLINK_CRC_EXTRA 1
#endif
#include "all/all.h" //all or the dialect you desire
#include "protocol.h"
#endif // MAVLINK_Hthen from arduino just call #include <mavlinkv2.h>hope it helps
--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/9b9da0ac-73a9-41ba-8f6c-321d99a551c0n%40googlegroups.com auf.
Hi,
That’s great, my problem is that even though I can include the library properly, it is causing memory problems when uploading the program to Arduino Uno. It is not normal, idk why….
Thanks,
Alejandro
Hello,
I am using the PX4 autopilot.
Best regards
--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/9b9da0ac-73a9-41ba-8f6c-321d99a551c0n%40googlegroups.com auf.
--
Patrick José Pereira
Electronics Engineer
--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von diesem Thema abmelden möchten, rufen Sie https://groups.google.com/d/topic/mavlink/sN88hoCPA8k/unsubscribe auf.
Wenn Sie sich von dieser Gruppe und allen Themen dieser Gruppe abmelden möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/mavlink/CANN23N%3DfKy2y3Bf8cYUe7sO12K8rjtHXt1voNWCmZLXqyKNiyA%40mail.gmail.com auf.