mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Merge pull request #8738 from fredericmorin/cms_cam_angle
Added CMS entry for cam angle compensation config
This commit is contained in:
commit
d746b4d3e7
1 changed files with 8 additions and 4 deletions
|
@ -98,12 +98,14 @@ CMS_Menu cmsx_menuRcPreview = {
|
||||||
|
|
||||||
static uint16_t motorConfig_minthrottle;
|
static uint16_t motorConfig_minthrottle;
|
||||||
static uint8_t motorConfig_digitalIdleOffsetValue;
|
static uint8_t motorConfig_digitalIdleOffsetValue;
|
||||||
|
static uint8_t rxConfig_fpvCamAngleDegrees;
|
||||||
static debugType_e systemConfig_debug_mode;
|
static debugType_e systemConfig_debug_mode;
|
||||||
|
|
||||||
static long cmsx_menuMiscOnEnter(void)
|
static long cmsx_menuMiscOnEnter(void)
|
||||||
{
|
{
|
||||||
motorConfig_minthrottle = motorConfig()->minthrottle;
|
motorConfig_minthrottle = motorConfig()->minthrottle;
|
||||||
motorConfig_digitalIdleOffsetValue = motorConfig()->digitalIdleOffsetValue / 10;
|
motorConfig_digitalIdleOffsetValue = motorConfig()->digitalIdleOffsetValue / 10;
|
||||||
|
rxConfig_fpvCamAngleDegrees = rxConfig()->fpvCamAngleDegrees;
|
||||||
systemConfig_debug_mode = systemConfig()->debug_mode;
|
systemConfig_debug_mode = systemConfig()->debug_mode;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -115,6 +117,7 @@ static long cmsx_menuMiscOnExit(const OSD_Entry *self)
|
||||||
|
|
||||||
motorConfigMutable()->minthrottle = motorConfig_minthrottle;
|
motorConfigMutable()->minthrottle = motorConfig_minthrottle;
|
||||||
motorConfigMutable()->digitalIdleOffsetValue = 10 * motorConfig_digitalIdleOffsetValue;
|
motorConfigMutable()->digitalIdleOffsetValue = 10 * motorConfig_digitalIdleOffsetValue;
|
||||||
|
rxConfigMutable()->fpvCamAngleDegrees = rxConfig_fpvCamAngleDegrees;
|
||||||
systemConfigMutable()->debug_mode = systemConfig_debug_mode;
|
systemConfigMutable()->debug_mode = systemConfig_debug_mode;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -127,6 +130,7 @@ static const OSD_Entry menuMiscEntries[]=
|
||||||
{ "MIN THR", OME_UINT16, NULL, &(OSD_UINT16_t){ &motorConfig_minthrottle, 1000, 2000, 1 }, REBOOT_REQUIRED },
|
{ "MIN THR", OME_UINT16, NULL, &(OSD_UINT16_t){ &motorConfig_minthrottle, 1000, 2000, 1 }, REBOOT_REQUIRED },
|
||||||
{ "DIGITAL IDLE", OME_UINT8, NULL, &(OSD_UINT8_t) { &motorConfig_digitalIdleOffsetValue, 0, 200, 1 }, REBOOT_REQUIRED },
|
{ "DIGITAL IDLE", OME_UINT8, NULL, &(OSD_UINT8_t) { &motorConfig_digitalIdleOffsetValue, 0, 200, 1 }, REBOOT_REQUIRED },
|
||||||
{ "DEBUG MODE", OME_TAB, NULL, &(OSD_TAB_t) { &systemConfig_debug_mode, DEBUG_COUNT - 1, debugModeNames }, 0 },
|
{ "DEBUG MODE", OME_TAB, NULL, &(OSD_TAB_t) { &systemConfig_debug_mode, DEBUG_COUNT - 1, debugModeNames }, 0 },
|
||||||
|
{ "FPV CAM ANGLE", OME_UINT8, NULL, &(OSD_UINT8_t) { &rxConfig_fpvCamAngleDegrees, 0, 90, 1 }, 0 },
|
||||||
{ "RC PREV", OME_Submenu, cmsMenuChange, &cmsx_menuRcPreview, 0},
|
{ "RC PREV", OME_Submenu, cmsMenuChange, &cmsx_menuRcPreview, 0},
|
||||||
|
|
||||||
{ "BACK", OME_Back, NULL, NULL, 0},
|
{ "BACK", OME_Back, NULL, NULL, 0},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue