dgatf / msrc

Multi Sensor for RC with RP2040 - FrSky D, SmartPort, XBUS, SRXL, IBUS, SBUS, Multiplex Sensor Bus, Jeti Ex Bus, Hitec
GNU General Public License v3.0
168 stars 41 forks source link

Airspeed Bug #49

Closed KHeintz closed 2 years ago

KHeintz commented 2 years ago

Found a small bug in Xbus.cpp. Airspeed should look like this, speed written in lower case and a semicolon was missing at the end.

#if CONFIG_AIRSPEED
    static uint16_t maxAirspeed = 0;
    airspeed.update();
    uint16_t airSpeed = round(*airspeed.valueP());
    xbusAirspeed.airspeed = __builtin_bswap16(airSpeed);
    if (airSpeed > maxAirspeed) 
    {
        maxAirspeed = airSpeed;
        xbusAirspeed.maxAirspeed = __builtin_bswap16(airSpeed);
    }
dgatf commented 2 years ago

Thanks. Fixed