Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horus widget flights count #67

Merged
merged 12 commits into from
Aug 24, 2022

Conversation

offer-shmuely
Copy link
Contributor

wiki-page:/offer-shmuely/edgetx-x10-widgets/wiki/FlightsCount

Horus Widget that count number of flights

  • flight considered successful: after 30sec the engine above 25%, and telemetry is active (to indicated that the model connected), and safe switch ON
  • flight considered ended: after 8sec of battery disconnection (detected by no telemetry)
  • warning: do NOT use this widget if model is using GV9!!!

widget assume the following:

  • the model have motor
  • the motor is activated on channel 3 (can be change in settings)
  • there is telemetry with one of the above [RSSI|RxBt|A1|A2|1RSS|2RSS|RQly]
  • there is a safe switch (arm switch)
  • global variable GV9 is free (i.e. not used)

state machine:

  • ground --> flight-starting --> flight-on --> flight-ending --> ground
  • all-flags on for 30s => flight-on
  • no telemetry for 8s => flight-completed

view of the widget on the Top Bar

image

view of the widget with debug mode on

image

image

To change the existing number of flight, edit the value of GV9

FlightCount2

FlightCount3

@MadMonkey87
Copy link

Now where we have more and more widgets we should consider the guide here: https://luadoc.edgetx.org/part_iv_-_advanced_topics/lua_data_sharing_across_scripts

Note that even if you do not use the widget, it will consume memory as long as it is installed. So I strongly suggest to split up the script into a "main" part and a "loadable" part that actually does the job. This ensures much less memory is consumed if you do not want to use the widget

@pfeerick pfeerick merged commit d180694 into EdgeTX:master Aug 24, 2022
@pfeerick
Copy link
Member

I really like this widget already, but also have a couple of suggestions / requests for future enhancement possibilities ;)

  • Arming switch inversion (can be by flag) since the switch operation is the exact opposite to how I use it - i.e. I use SF, and pull inwards to arm, out to disarm - whereas this expects the other direction.
  • Some visual indication of the 'flight start' elements being met (when not debugging)... i.e. maybe a set of dots that light up in turn as requirements are met, and also similar for flight ending counter running.
  • Better text alignment when fullscreen (I know, minor quibble, but any improvement suggestion is good... right? 😆)

@offer-shmuely offer-shmuely deleted the horus_widget-flights-count branch February 1, 2023 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants