ardupilot/libraries/AP_OSD/AP_OSD_Setting.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.8 KiB
C++
Raw Permalink Normal View History

2018-06-24 07:00:23 -03:00
/*
* This file is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
* AP_OSD partially based on betaflight and inav osd.c implemention.
* clarity.mcm font is taken from inav configurator.
* Many thanks to their authors.
*/
/*
parameter object for one setting in AP_OSD
*/
#include "AP_OSD.h"
const AP_Param::GroupInfo AP_OSD_Setting::var_info[] = {
// @Param: _EN
// @DisplayName: Enable
// @Description: Enable setting
// @Values: 0:Disabled,1:Enabled
// @User: Standard
AP_GROUPINFO_FLAGS_DEFAULT_POINTER("_EN", 1, AP_OSD_Setting, enabled, default_enabled),
2018-06-24 07:00:23 -03:00
// @Param: _X
// @DisplayName: X position
// @Description: Horizontal position on screen
2018-06-24 07:36:03 -03:00
// @Range: 0 29
2018-06-24 07:00:23 -03:00
// @User: Standard
AP_GROUPINFO_FLAGS_DEFAULT_POINTER("_X", 2, AP_OSD_Setting, xpos, default_xpos),
2018-06-24 07:00:23 -03:00
// @Param: _Y
// @DisplayName: Y position
// @Description: Vertical position on screen
// @Range: 0 15
// @User: Standard
AP_GROUPINFO_FLAGS_DEFAULT_POINTER("_Y", 3, AP_OSD_Setting, ypos, default_ypos),
2018-06-24 07:00:23 -03:00
AP_GROUPEND
};
// constructor
2023-01-05 19:29:08 -04:00
AP_OSD_Setting::AP_OSD_Setting(bool _enabled, uint8_t x, uint8_t y) :
default_enabled(_enabled),
default_xpos(x),
default_ypos(y)
2018-06-24 07:00:23 -03:00
{
AP_Param::setup_object_defaults(this, var_info);
2018-06-24 07:00:23 -03:00
}