1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

dateTime_t should be declared inside USE_RTC_TIME

This commit is contained in:
jflyper 2019-02-03 11:47:36 +09:00
parent 493d0d0d8f
commit bc2e13e021

View file

@ -286,7 +286,6 @@ bool srxlFrameGpsStat(sbuf_t *dst, timeUs_t currentTimeUs)
uint32_t timeBcd;
uint16_t speedKnotsBcd, speedTmp;
uint8_t numSatBcd, altitudeHighBcd;
dateTime_t dt;
bool timeProvided = false;
if (!featureIsEnabled(FEATURE_GPS) || !STATE(GPS_FIX) || gpsSol.numSat < 6) {
@ -302,6 +301,7 @@ bool srxlFrameGpsStat(sbuf_t *dst, timeUs_t currentTimeUs)
speedKnotsBcd = (speedTmp > 9999) ? dec2bcd(9999) : dec2bcd(speedTmp);
#ifdef USE_RTC_TIME
dateTime_t dt;
// RTC
if (rtcHasTime()) {
rtcGetDateTime(&dt);