-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Programming Tab Documentation Update #10322
Comments
I toyed with that earlier, but I was a bit afraid I was going to break something. I'd love to learn, is there a good resource for how to do it properly without blowing anything up? As stated, I'm not a programmer, but I can certainly update some documentation as a first step towards learning how. |
You can't break anything - you don't have the necessary permissions to do any harm. All you can do is edit your own copy and then submit a request that we pull in your changes. The request for us to pull in your changes is called a "pull request". This page has a section on Git and GitHub, but for changes that effect only one file the the online process that GitHub walks you through is fine. The main thing that comes to mind for me within the process of doing it right on the web page is when you save a file ("commit") or request that we pull your changes (a "pull request"), there's a field where you can type it a one-line description of your change. Please use that field. :) One other thought - |
Examples of using that field to describe the change: https://github.com/iNavFlight/inav/commits/master/docs Notice on one Mosca writes "Add basic sbus information and link to full docs". On another, it's "Remove mention of UBLOX7." One of these descriptions isn't as useful as the other two. :) |
I appreciate the explanation, and your explanation of how to note the result of div/0 makes sense. If I am going to attempt to update the documentation myself, I need some resolution to item # 3 and item # 4 in my original message. Once I get some clarity to these, I can try to propose some changes. 3: It appears that GVARs are limited to 5 digits (at least on the OSD), but I am not certain if that limit also pertains to the inter-line math. Can someone clarify the maximum value that a program can compute before truncation occurs? Or does anyone know how many bits are dedicated to these numbers? 4: Regarding the PID loops available to the program tab - does anyone have an example of a program that utilized these controllers? Are they adjustable via the in-flight adjustments tab? It doesn't appear so, so they seem like they would be very difficult to tune. I guess I should create a separate feature request ticket for the specific requests brought up in my original post, rather than discuss them here. |
Global variables are 16-bit signed integers. negative 32768 through positive 32767. The best I can tell, the user PID(FF) controllers are not hooked to inflight adjustments - the P, I, D, and FF values can't be changed in flight. The user PID controllers seem to be possibly the least-used feature in INAV. Of the probably few thousand pilots I've talked to, I recall one who wanted to use that feature. |
I appreciate you looking into that. I believe I have seen 6-digits show up on the programming tab end-line "summary column". Are these programming lines given longer signed integers? |
One could set test rule that adds 100 on each loop and verify for sure how high it goes? |
This issue is being addressed in PR #10335. Lets see if I did things right! |
Current Behavior
A few things I've noted that are not covered in the programming documentation. This "bug" report is mainly an issue of incomplete documentation, so it should be fairly simple to update and clarify fully within github, but I also included some thoughts for future improvement in the last paragraph.
Steps to Reproduce
Expected behavior
I expected floating-point math that allowed for the use of decimals.
Suggested solution(s)
At a minimum, these limitations should be highlighted in the programming tab documentation. It has taken a lot of troubleshooting to uncover these issues.
Additional context
I ran into these issues when attempting to create my own auto-throttle controller. I ended up successfully creating it:
https://www.rcgroups.com/forums/showthread.php?4602461-INAV-Fixed-Wing-Auto-Throttle-Speed-Program
This is a separate thing, but I think this could be a nice feature to add to INAV, though I recognize it would require some additional parameters to be baked in to configurator.
I'd love to do more of my own programming like this (I am not a programmer, but I can do GUI-based programming), but there are many parameters in the flight controller that aren't accessible to the programming tab. I'd love to see this list expanded. Specifically, I'd like to be able to manipulate PIDFF values from the programming tab.
The text was updated successfully, but these errors were encountered: