fishpepper / OpenSky

opensource implementation of the frsky protocol for multiple targets (D4R-ii, VD5M)
http://fishpepper.de/projects/opensky/
GNU General Public License v3.0
155 stars 69 forks source link

Small fixes #2

Closed thiagohmoreira closed 8 years ago

thiagohmoreira commented 8 years ago

Hey, made 2 small fixes.

  1. The one in main.c I think is very straight forward, there is a missing include header for SBUS, fixes these compiler warnings:

    main.c:73: warning 112: function 'sbus_init' implicit declaration
    main.c:73: warning 84: 'auto' variable 'sbus_init' may be used before initialization
    main.c:73: warning 84: 'auto' variable 'sbus_init' may be used before initialization
  2. In delay.c I'm not 100% sure... removed static from both functions, to fix this issue when compiling on Windows [SDCC 3.5.0 #9253 (Jun 20 2015) (MINGW64)]:

    delay.c:20: error 146: two or more storage classes in declaration for 'delay_ms'
    delay.c:45: error 146: two or more storage classes in declaration for 'delay_us'

    With no changes it compiled only in Linux [SDCC 3.3.0 #8604 (Dec 30 2013) (Linux) - Ubuntu], and after the change the generated main.hex are identical (could not test this on Windows), so I guess it should be fine also.

Hope it helps ;)

fishpepper commented 8 years ago

thanks for the patches! i do not know how the static made it into the code in the first place as it meakes absolutely no sense here :)