Skip to content

Commit d1aafac

Browse files
committed
debug osd_framerate_hz
1 parent 842a7a8 commit d1aafac

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/fc/settings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tables:
8484
"VIBE", "CRUISE", "REM_FLIGHT_TIME", "SMARTAUDIO", "ACC",
8585
"NAV_YAW", "PCF8574", "DYN_GYRO_LPF", "AUTOLEVEL", "ALTITUDE",
8686
"AUTOTRIM", "AUTOTUNE", "RATE_DYNAMICS", "LANDING", "POS_EST",
87-
"ADAPTIVE_FILTER", "HEADTRACKER", "GPS", "LULU", "SBUS2"]
87+
"ADAPTIVE_FILTER", "HEADTRACKER", "GPS", "LULU", "SBUS2", "OSD_REFRESH"]
8888
- name: aux_operator
8989
values: ["OR", "AND"]
9090
enum: modeActivationOperator_e

src/main/io/osd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <ctype.h>
3030
#include <math.h>
3131
#include <inttypes.h>
32+
#include <limits.h>
3233

3334
#include "platform.h"
3435

@@ -4272,6 +4273,10 @@ void osdDrawNextElement(void)
42724273
if (elementsPerCycle > activeElements) elementsPerCycle = activeElements;
42734274
}
42744275

4276+
DEBUG_SET(DEBUG_OSD_REFRESH, 0, elementsPerCycle);
4277+
DEBUG_SET(DEBUG_OSD_REFRESH, 1, activeElements);
4278+
DEBUG_SET(DEBUG_OSD_REFRESH, 2, framerate_hz);
4279+
42754280
for (uint8_t i = 0; i < elementsPerCycle; i++) {
42764281
uint8_t index = elementIndex;
42774282
do {

0 commit comments

Comments
 (0)