Merge pull request #10243 from alexeystn/osd_high_framerate
This commit is contained in:
commit
d249ee44b9
|
@ -1426,6 +1426,7 @@ const clivalue_t valueTable[] = {
|
|||
{ "osd_rcchannels", VAR_INT8 | MASTER_VALUE | MODE_ARRAY, .config.array.length = OSD_RCCHANNELS_COUNT, PG_OSD_CONFIG, offsetof(osdConfig_t, rcChannels) },
|
||||
{ "osd_camera_frame_width", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { OSD_CAMERA_FRAME_MIN_WIDTH, OSD_CAMERA_FRAME_MAX_WIDTH }, PG_OSD_CONFIG, offsetof(osdConfig_t, camera_frame_width) },
|
||||
{ "osd_camera_frame_height", VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { OSD_CAMERA_FRAME_MIN_HEIGHT, OSD_CAMERA_FRAME_MAX_HEIGHT }, PG_OSD_CONFIG, offsetof(osdConfig_t, camera_frame_height) },
|
||||
{ "osd_task_frequency", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { OSD_TASK_FREQUENCY_MIN, OSD_TASK_FREQUENCY_MAX }, PG_OSD_CONFIG, offsetof(osdConfig_t, task_frequency) },
|
||||
#endif // end of #ifdef USE_OSD
|
||||
|
||||
// PG_SYSTEM_CONFIG
|
||||
|
|
|
@ -335,6 +335,7 @@ void tasksInit(void)
|
|||
#endif
|
||||
|
||||
#ifdef USE_OSD
|
||||
rescheduleTask(TASK_OSD, TASK_PERIOD_HZ(osdConfig()->task_frequency));
|
||||
setTaskEnabled(TASK_OSD, featureIsEnabled(FEATURE_OSD) && osdGetDisplayPort(NULL));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -339,6 +339,8 @@ void pgResetFn_osdConfig(osdConfig_t *osdConfig)
|
|||
|
||||
osdConfig->camera_frame_width = 24;
|
||||
osdConfig->camera_frame_height = 11;
|
||||
|
||||
osdConfig->task_frequency = 60;
|
||||
}
|
||||
|
||||
void pgResetFn_osdElementConfig(osdElementConfig_t *osdElementConfig)
|
||||
|
|
|
@ -49,6 +49,9 @@ extern const char * const osdTimerSourceNames[OSD_NUM_TIMER_TYPES];
|
|||
#define OSD_CAMERA_FRAME_MIN_HEIGHT 2
|
||||
#define OSD_CAMERA_FRAME_MAX_HEIGHT 16 // Rows supported by MAX7456 (PAL)
|
||||
|
||||
#define OSD_TASK_FREQUENCY_MIN 30
|
||||
#define OSD_TASK_FREQUENCY_MAX 300
|
||||
|
||||
#define OSD_PROFILE_BITS_POS 11
|
||||
#define OSD_PROFILE_MASK (((1 << OSD_PROFILE_COUNT) - 1) << OSD_PROFILE_BITS_POS)
|
||||
#define OSD_POS_MAX 0x3FF
|
||||
|
@ -284,6 +287,7 @@ typedef struct osdConfig_s {
|
|||
uint8_t logo_on_arming_duration; // display duration in 0.1s units
|
||||
uint8_t camera_frame_width; // The width of the box for the camera frame element
|
||||
uint8_t camera_frame_height; // The height of the box for the camera frame element
|
||||
uint16_t task_frequency;
|
||||
} osdConfig_t;
|
||||
|
||||
PG_DECLARE(osdConfig_t, osdConfig);
|
||||
|
|
Loading…
Reference in New Issue