1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00
Commit graph

94 commits

Author SHA1 Message Date
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Asizon
6061e4e3ea Move Skip to a function 2020-01-28 15:48:14 +01:00
Asizon
6a53ee5baf Remove white line 2020-01-23 11:55:54 +01:00
Asizon
d6391dafe1 Skip DYNAMIC readonly entries 2020-01-23 11:45:45 +01:00
Asizon
8f4880409d Fix CMS Menu Navigation 2020-01-16 10:16:38 +01:00
Michael Keller
dad2b244e9
Make CMS OSD menu max7456 settings have realtime effect (#9275)
Make CMS OSD menu max7456 settings have realtime effect
2019-12-10 12:41:03 +13:00
Michael Keller
7d215e8f84
Fixed 'back' command for CMS menus. (#9266)
Fixed 'back' command for CMS menus.
2019-12-10 01:48:23 +13:00
Bruce Luckcuck
65aac98c1f Make CMS OSD menu max7456 settings have realtime effect
Makes the invert, black brightness, and white brightness update the display as the settings are changed rather than only taking effect once the menu is exited.
2019-12-08 18:01:14 -05:00
mikeller
9a5e647b11 Inhibit 'Save & Exit' menu when in RC preview. 2019-12-08 12:57:55 +13:00
mikeller
cd061168ec Fixed 'back' command for CMS menus. 2019-12-08 09:47:26 +13:00
mikeller
438a801eb8 Fixed 'cast-function-type' warnings, reworked CMS function pointer juggle. 2019-11-29 03:45:27 +13:00
Michael Keller
140bb22b88 Removed 'checkRedirect' and references to it. 2019-11-26 19:14:47 +13:00
Michael Keller
23c458e85f
Fixed exiting from CMS menu. (#9221)
Fixed exiting from CMS menu.
2019-11-26 06:19:14 +13:00
jflyper
2e84b0c442 Add support for character attribute rich displayport 2019-11-25 10:43:29 +09:00
mikeller
f2ea50faec Fixed exiting from CMS menu. 2019-11-25 02:21:11 +13:00
mikeller
cedcf2d7e2 Added calibration menu to CMS. 2019-11-19 13:59:52 +13:00
Michael Keller
8548189bc6
Add OSD background support for the static portions of display e… (#9129)
Add OSD background support for the static portions of display elements
2019-10-31 00:10:01 +13:00
Bruce Luckcuck
5f5ee33718 Add OSD background support for the static portions of display elements
Significantly reduces the time the OSD task spends drawing elements that are completely or mostly static. The larger the element the more time savings are realized. Currently implemented support for:
- Crosshairs
- Artificial Horizon Sidebars
- Craft name
- Display name
- Stick overlay

Since the static portions are only rendered once, the static elements add no processing time to the OSD task. As an example, enabling the above elements prior to these changes results in a total rendering time of 47us. After the enhancements they take only 6us (basically the rendering phase minimum overhead). So effectively 41us are removed from the OSD task.

Opens the possibility to add large mostly static elements with no additional overhead. An example would be a camera framing element that might draw a "box" around most of the screen. Previously this would add significant processing overhead to the OSD task, but now it will have no impact.
2019-10-28 19:34:29 -04:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
Bruce Luckcuck
5c98726318 Replace individual CMS vtx menus with a single entry that redirects to the correct protocol menu
Instead of having individual menus for RTC6705, SmartAudio, and Tramp, Now there is a single VTX menu that detects the type of active device and redirects to the appropriate protocol menu.

Reduces confusion and chances of erroneously using the wrong VTX menu.

Fixes a problem where the Tramp menu could be used to change band/channel/power even though the VTX was a SmartAudio device.

If the VTX is not configured or not communicating, a more informative message will be presented rather than a partially populated protocol menu. For example:
```
  VTX NOT RESPONDING
  OR NOT CONFIGURED

> BACK
```

Extends the CMS menu capabilities by adding an optional `redirectCheck` function that can conditionally return a menu that should be redirected to instead of the current menu. This redirect happens before any processing happens for the original menu. Adds flexibility to make the CMS menus have a more dynamic aspect.
2019-10-19 20:17:43 -04:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Bruce Luckcuck
9081bd3338 Add CMS menu entry level control of forced reboot on changes
CMS menu items can now be defined with a `REBOOT_REQUIRED` flag. If the user changes flagged elements the the exit/save options will change to `EXIT&REBOOT` and `SAVE&REBOOT` - ensuring that the changed items will be handled properly. This should be used for options where runtime changes either won't take effect (because they are read at boot), or for items that could have unexpected behavior if changed.

Several appropriate menus have been updated to include the flag.

To accomodate the dynamic nature of the save/exit options, the individual options have been removed from the main menu and replaced with a `SAVE/EXIT` submenu. This is the same menu that is presented as the quick-access popup save menu (yaw-right). This menu will adapt to requiring a reboot if any flagged setting is changed. Additionally the `REBOOT_REQD` arming disabled reason will be set (cleared by the reboot).
2019-05-20 12:39:36 -04:00
Michael Keller
a4ac70bd95
Fix pageMaxRow use before update (#8222)
Fix pageMaxRow use before update
2019-05-09 14:53:15 +12:00
Timothy Werquin
711424f63b
Fix pageMaxRow use before update
After commit d2e7abd the for loop following my change use pageMaxRow to determine which flags to clear.
But this pageMaxRow value is updated after the loop, which caused a crash in a very specific circumstance:

1 open the CMS OSD menu and go to profile

2 close the profile by yaw right, select exit

3 open CMS OSD menu and go to profile again

This caused a crash as runtimeEntryFlags wasn't cleared properly and the Copy Profile entry's flags still indicated OPTSTRING somehow.
which caused it's CMSEntryFuncPtr function to be cast to OPTSTRING and called without arguments.
2019-05-08 00:36:23 +02:00
mikeller
4fb58b340e Extend the scope of BOXPARALYZE to cover stick commands, adjustments, and CMS. 2019-05-06 01:28:37 +12:00
Curtis Bangert
94102cc798 Updated CMS to pass flags by reference into cmsDrawMenuEntry 2019-04-02 12:41:09 -04:00
Pieter Kruger
d2e7abd5c6 Add fix for runtimeEntryFlags array overrun 2019-03-03 13:27:35 +10:00
Bruce Luckcuck
30672a37c5 Refactor OSD element display code
Remove the giant `select` block that contained all the code to generate the elements and transition them to individual functions called only when the element is active. Simplifies the code and results in a performance improvement as it's not necessary to fall through the large `select` statement for every element that will be drawn. The individual functions and the element to function mapping are moved to a new `osd_elements.c` file.

Moved the OSD related code files to a new `osd/` directory.

Also pre-analyze the active elements and only process those that are active. This also saves processing as it's not necessary to loop through all 50 or so elements when only a couple are active.

Various other cleanup and removal of stale or unnecessary code.

In the default configuration the element drawing phase of the OSD task is reduced from ~51us to ~35us - resulting in about a 30% decrease in processing time.
2019-02-21 14:03:25 -05:00
Dominic Clifton
78f38daa4f Drastically reduce the CMS RAM usage.
Previously the runtime page state was mixed with the page configuration.

This resolves this by:
a) making the configuration entries constant so they do not need to be
in RAM.
b) Maintaining page state independently.
2019-02-17 00:18:24 +01:00
Michael Keller
46c4da05a1
Merge pull request #7443 from etracer65/cms_multiple_entry_wedging
Fix array overflow/wedge after multiple entries into CMS
2019-01-22 18:10:37 +13:00
Bruce Luckcuck
a0eb2c8fa7 Fix array overflow/wedge after multiple entries into CMS
The menu stack counter was not being reset when CMS was initially entered and multiple entries can cause an array overflow/memory corruption and wedge.

Previosuly the problem was accidentally prevented because the user was required to "back out" through the menus to exit which decremented the array index. However with the addition of the popup exit/save menu it became possible to exit without traversing back through the menu structure and this bug was exposed.
2019-01-20 22:40:06 -05:00
Scavanger
dd30009925 "Fullscreen" mode for displayports. 2019-01-20 20:46:23 +01:00
Bruce Luckcuck
5b5581fa2a CMS exit/save popup menu
Adds a new exit/save menu that can be displayed at any time using the yaw-right stick command. Yaw-left still functions as "back".

Allows the user to save their settings even while nested deep in multiple menus. Previously the user was required to back up all the way to the top level menu to save or exit.
2019-01-10 18:59:50 -05:00
Pieter Kruger
23386af1ac Update OSD Elements menu for OSD Profiles 2018-12-16 13:34:49 +10:00
Pieter Kruger
4a37a7c833 Add fix for issue 7196 OSD active elements menu moves items left by one 2018-12-10 23:14:01 +10:00
Pieter Kruger
8d981df1a9 Add OSD Profile feature - issue 4155 2018-12-01 17:51:38 +10:00
Andi Kanzler
1b98b1e2aa Improvements from review. 2018-07-01 01:05:44 +02:00
Andi Kanzler
31830dc10c Bring the CMS to the HoTT-Textmode. 2018-07-01 01:05:43 +02:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
Chris
8cbd91c9ee Duplicate include 2018-04-30 01:02:02 +02:00
Chris
641e555e7b Check if HID is actually enabled in options. 2018-04-30 00:51:14 +02:00
Chris
b824f900d9 Fixup as in PR commits. 2018-04-30 00:46:21 +02:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
Michael Keller
3ef12389da
Merge pull request #5743 from codecae/crsf_displayport
CMS Telemetry over CRSF w/ Lua Script (X9D, so far)
2018-04-25 00:09:58 +12:00
Curtis Bangert
9d4d3ad45c CMS Telemetry over CRSF w/ Lua Script (X9D, so far) 2018-04-23 22:34:30 -04:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
Anders Hoglund
c8a42924f9 Spektrum CMS over TM performance increase. 2018-02-20 18:47:52 +01:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Anders Hoglund
0e1f0e89e7 Spektrum, CMS over Telemetry. Rebased and squashed. 2017-11-14 15:57:33 +01:00
Michael Keller
364afcbf25
Merge pull request #4521 from martinbudden/bf_cms_onglobalexit
Remove almost entirely unused CMS ononGlobalExit function
2017-11-10 10:35:13 +13:00