-
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
Change gimbal sensitivity from programming framework #10405
base: master
Are you sure you want to change the base?
Change gimbal sensitivity from programming framework #10405
Conversation
Why not int8_t? That range doesn't need int16_t. |
I think that this would be better as an adjustment. Rather than in the programming framework. It's more like a tuning change that you'll adjust once. Not all the time. |
uint8_t is an unsigned 8-bit integer, which can have the range 0-255. int16_t is an signed 16-bit, with a range of -32,768 to 32,767 You probably want int8_t , which has the range -128 to 127 |
yea, I decided to use int16 because in struct what is sending to gimbal is int16 I don't know why programmers of gimbal decided to use two bytes for sensitivity. I like uniformity so I used int16, it's not problem to change to int8, it's not big deal. Story behind, why I would like to change gimbal sensitivity durrung flight. I use gimbal on plane, inav provides nice autonomous flying so I would like to set small sensitivity (for nice stabilised image) durring autonomous flight and hight sensitivity (lock image) If I fly FPV. Firs flight I flew with gimbal which was set to small sensitivity (stabilized image) and it was not nice experience to fly with it, it feels like flying with huuuuge input lag. |
I rewrite it to int8, I will move it from draft to pull request I will test it on field. |
@error414 One comment for this change. Do we want the change made in the programming framework to be permanent or temporary? Currently it would result in a permanent change. But if we want it to revert when there is a power cycle. Maybe it should be made temporary. Other than that, it looks good. |
I don't know :). I'm OK with both cases. I decided to make it permanent, because when I tested VTX settings via programming framework it was permanent as well. So I wanted to keep logic in INAV same as it's possible. Be honest, I'm not big fun to set config values (configMuttable()->xxx = yyyy) in programming framework. If you save settings for example by stick command then new value from programming framework will be saved to eeprom. So if you would like to make "sensitivity setting" temporary, maybe would be good idea to revisit programming framework's values and fix all function which set anything in config via "configMuttable()->.....", to make it consistent for all. |
Hi , any progress on this great to have feature, as i just heard that a feature freeze is coming up and would be too bad to miss out on this. Thanks for your work and looking forwad to this. |
before pull allowing I need test it on air, on plane, last week I tested it, unfortunately the code in programing framework was not correct, I'm going to field tomorow to test it again. If it will work, I will move pull request from draft to ready. |
tested on air, it works without any problem |
Would be nice to change gimbal sensitivity during flight, the easiest way how to achieve it by programming framework.
In settings.yaml is mentioned min max values as -16 to 15, but variable in configuration is not marked as int16, default value is uint8.
https://github.com/iNavFlight/inav/blob/master/src/main/fc/settings.yaml#L4284
This PR assume that source of true is min max -16 to 15, so I changed type for all related variables in code from uint8 to int16.
iNavFlight/inav-configurator#2204