mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
dateTime_t should be declared inside USE_RTC_TIME
This commit is contained in:
parent
493d0d0d8f
commit
bc2e13e021
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,6 @@ bool srxlFrameGpsStat(sbuf_t *dst, timeUs_t currentTimeUs)
|
||||||
uint32_t timeBcd;
|
uint32_t timeBcd;
|
||||||
uint16_t speedKnotsBcd, speedTmp;
|
uint16_t speedKnotsBcd, speedTmp;
|
||||||
uint8_t numSatBcd, altitudeHighBcd;
|
uint8_t numSatBcd, altitudeHighBcd;
|
||||||
dateTime_t dt;
|
|
||||||
bool timeProvided = false;
|
bool timeProvided = false;
|
||||||
|
|
||||||
if (!featureIsEnabled(FEATURE_GPS) || !STATE(GPS_FIX) || gpsSol.numSat < 6) {
|
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);
|
speedKnotsBcd = (speedTmp > 9999) ? dec2bcd(9999) : dec2bcd(speedTmp);
|
||||||
|
|
||||||
#ifdef USE_RTC_TIME
|
#ifdef USE_RTC_TIME
|
||||||
|
dateTime_t dt;
|
||||||
// RTC
|
// RTC
|
||||||
if (rtcHasTime()) {
|
if (rtcHasTime()) {
|
||||||
rtcGetDateTime(&dt);
|
rtcGetDateTime(&dt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue