Skip to content

Conversation

@per1234
Copy link

@per1234 per1234 commented Mar 5, 2017

arduino-mavlink no longer compiles with recent versions of the Arduino IDE for multiple reasons. This pull request resolves these issues.

  • Fix iincorrect FastSerial library include order.
  • Use correct progmem types. The types previously used are no longer supported by recent versions of avr-gcc.
  • Fix invalid library warning for mavlink library.

I don't own the hardware to be able to test these changes beyond verifying that they do now compile. I started the work with the understanding that someone who owns the hardware would do the testing but this ended up being beyond their capabilities. However, these are pretty basic changes unlikely to cause any problems.

…library

Recent Arduino IDE versions have changed the sketch preprocessing system
which causes the automatically added include of Arduino.h to be added
before the FastSerial include. FastSerial relies on being called before
Arduino.h and so without this change trying to compile ArduinoMavLink
with any recent IDE version fails with the error:
```
E:\arduino\libraries\FastSerial/FastSerial.h:47:3: error: #error Must
include FastSerial.h before the Arduino serial driver is defined.
```
Newer AVR-GCC versions used in recent versions of the Arduino IDE no
longer support the use of the non-standard progmem typedefs, causing
compilation to fail without this change:
```
E:\arduino\libraries\FastSerial\BetterStream.cpp:20:29: error:
'prog_char' does not name a type
```
```
E:\arduino\libraries\FastSerial\vprintf.cpp:55:40: error: 'prog_char'
does not name a type
```
Arduino IDE 1.6.6 and newer enforce strict standards on all subfolders
of the libraries folder. The improperly formatted mavlink library causes
the following warning:
```
Invalid library found in E:\arduino\libraries\mavlink:
E:\Stuff\misc\electronics\arduino\libraries\mavlink
```
To fix this without breaking backwards compatibility with older Arduino
IDE versions the library source files were moved from the include folder
to the root folder of the library. The documentation and sketch were
updated to reflect this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant