Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
deltaflight
deltaflight
Commits
7ed71121
Unverified
Commit
7ed71121
authored
Apr 18, 2021
by
Paweł Spychalski
Committed by
GitHub
Apr 18, 2021
Browse files
Merge pull request #6838 from OptimusTi/stat-pages-check
Stats pages fix
parents
852ef277
ee71cdf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/io/osd.c
View file @
7ed71121
...
...
@@ -984,7 +984,7 @@ static bool osdIsHeadingValid(void)
}
else
{
return
isImuHeadingValid
();
}
#else
#else
return
isImuHeadingValid
();
#endif
}
...
...
@@ -997,7 +997,7 @@ int16_t osdGetHeading(void)
}
else
{
return
attitude
.
values
.
yaw
;
}
#else
#else
return
attitude
.
values
.
yaw
;
#endif
}
...
...
@@ -1941,7 +1941,7 @@ static bool osdDrawSingleElement(uint8_t item)
pitchAngle
=
DECIDEGREES_TO_RADIANS
(
secondaryImuState
.
eulerAngles
.
values
.
pitch
);
}
else
{
rollAngle
=
DECIDEGREES_TO_RADIANS
(
attitude
.
values
.
roll
);
pitchAngle
=
DECIDEGREES_TO_RADIANS
(
attitude
.
values
.
pitch
);
pitchAngle
=
DECIDEGREES_TO_RADIANS
(
attitude
.
values
.
pitch
);
}
#else
rollAngle
=
DECIDEGREES_TO_RADIANS
(
attitude
.
values
.
roll
);
...
...
@@ -3118,7 +3118,7 @@ static void osdShowStatsPage1(void)
displayBeginTransaction
(
osdDisplayPort
,
DISPLAY_TRANSACTION_OPT_RESET_DRAWING
);
displayClearScreen
(
osdDisplayPort
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
++
,
"--- STATS --- 1/2"
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
++
,
"--- STATS --- 1/2
->
"
);
if
(
feature
(
FEATURE_GPS
))
{
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MAX SPEED :"
);
...
...
@@ -3139,22 +3139,24 @@ static void osdShowStatsPage1(void)
osdFormatAltitudeStr
(
buff
,
stats
.
max_altitude
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
#if defined(USE_SERIALRX_CRSF)
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN LQ :"
);
itoa
(
stats
.
min_lq
,
buff
,
10
);
strcat
(
buff
,
"%"
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
switch
(
rxConfig
()
->
serialrx_provider
)
{
case
SERIALRX_CRSF
:
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN LQ :"
);
itoa
(
stats
.
min_lq
,
buff
,
10
);
strcat
(
buff
,
"%"
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN RSSI :"
);
itoa
(
stats
.
min_rssi_dbm
,
buff
,
10
);
tfp_sprintf
(
buff
,
"%s%c"
,
buff
,
SYM_DBM
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
#else
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN RSSI :"
);
itoa
(
stats
.
min_rssi
,
buff
,
10
);
strcat
(
buff
,
"%"
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
#endif
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN RSSI :"
);
itoa
(
stats
.
min_rssi_dbm
,
buff
,
10
);
tfp_sprintf
(
buff
,
"%s%c"
,
buff
,
SYM_DBM
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
break
;
default:
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN RSSI :"
);
itoa
(
stats
.
min_rssi
,
buff
,
10
);
strcat
(
buff
,
"%"
);
displayWrite
(
osdDisplayPort
,
statValuesX
,
top
++
,
buff
);
}
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"FLY TIME :"
);
uint16_t
flySeconds
=
getFlightTime
();
...
...
@@ -3181,7 +3183,7 @@ static void osdShowStatsPage2(void)
displayBeginTransaction
(
osdDisplayPort
,
DISPLAY_TRANSACTION_OPT_RESET_DRAWING
);
displayClearScreen
(
osdDisplayPort
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
++
,
"--- STATS ---
2/2"
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
++
,
"--- STATS ---
<-
2/2"
);
displayWrite
(
osdDisplayPort
,
statNameX
,
top
,
"MIN BATTERY VOLT :"
);
osdFormatCentiNumber
(
buff
,
stats
.
min_voltage
,
0
,
osdConfig
()
->
main_voltage_decimals
,
0
,
osdConfig
()
->
main_voltage_decimals
+
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment