AP_OSD_Setting.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * This file is free software: you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License as published by the
  4. * Free Software Foundation, either version 3 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This file is distributed in the hope that it will be useful, but
  8. * WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. * See the GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License along
  13. * with this program. If not, see <http://www.gnu.org/licenses/>.
  14. *
  15. * AP_OSD partially based on betaflight and inav osd.c implemention.
  16. * clarity.mcm font is taken from inav configurator.
  17. * Many thanks to their authors.
  18. */
  19. /*
  20. parameter object for one setting in AP_OSD
  21. */
  22. #include "AP_OSD.h"
  23. const AP_Param::GroupInfo AP_OSD_Setting::var_info[] = {
  24. // @Param: _EN
  25. // @DisplayName: Enable
  26. // @Description: Enable setting
  27. // @Values: 0:Disabled,1:Enabled
  28. // @User: Standard
  29. AP_GROUPINFO("_EN", 1, AP_OSD_Setting, enabled, 0),
  30. // @Param: _X
  31. // @DisplayName: X position
  32. // @Description: Horizontal position on screen
  33. // @Range: 0 29
  34. // @User: Standard
  35. AP_GROUPINFO("_X", 2, AP_OSD_Setting, xpos, 0),
  36. // @Param: _Y
  37. // @DisplayName: Y position
  38. // @Description: Vertical position on screen
  39. // @Range: 0 15
  40. // @User: Standard
  41. AP_GROUPINFO("_Y", 3, AP_OSD_Setting, ypos, 0),
  42. AP_GROUPEND
  43. };
  44. // constructor
  45. AP_OSD_Setting::AP_OSD_Setting(bool _enabled, uint8_t x, uint8_t y)
  46. {
  47. enabled = _enabled;
  48. xpos = x;
  49. ypos = y;
  50. }