Closed TheAdamizer closed 6 years ago
Here is the reverted fork I built that seems to work perfectly with mach 2s: https://github.com/TheAdamizer/butterflight
@TheAdamizer - so what you are saying is that setting VTX_AKK_HACK to ON didn't work for you?
@kidBrazil I'm saying that not only did it not work for me, but that there is a functional difference between the old implementation of smart audio and the new implementation of smart audio with the akk hack such that the old implementation works and the new implementation does not, so hopefully something more specific than simply "vtx_akk_hack didn't work for me"
edit I'm sorry I was not clear: At first I attempted to use the VTX_AKK_HACK and couldn't get it to work in addition to a known working configuration it was only after fully reverting the PR that smart audio to the mach 2 worked correctly.
Probably at least part of the problem is that you're not conditionally setting SA_QSIZE to 4 given VTX_AKK_HACK is on which could be something that the mach 2's rely on. I'm not a C programmer at all however so I didn't try diving further into it.
Here are the changes required
https://github.com/krankenreif/betaflight/commit/90efdec9da7722a74121758379a004dec38e9146
Based on the existing code of butterflight something along the lines of:
if (vtxSettingsConfig()->akkStyleEndFrame) {
} else {
}
if (vtxSettingsConfig()->akkStyleEndFrame)
{
portOptions_e portOptions = SERIAL_STOPBITS_1;
}
else
{
portOptions_e portOptions = SERIAL_STOPBITS_2;
}
Now, I'm not a good coder and this is based off the last time I coded anything nearly 15 years ago.
But I'm sure any good coder would understand what I am setting forward given the information. I have no ability or time now to compile or create a build environment. Good luck.
Yea like I said I'm not a C dev I write JS lol so I tried to do something exactly like that but got some weird error about some constant being variable at runtime (duck typing for life, yo lol) and was like yea...I'm not gonna write reliable code here so I'm just gonna revert and get my own quad in the air.
@TheAdamizer Thanks man, I appreciate you giving me the details - I will look into it since I did the implementation and get this resolved ASAP.
@ijustwannafly - thank you for that!
@TheAdamizer - @LexioTech has been working on a new implementation for the AKK thing using features. He will be adding the SA_QSIZE and other missing parameters
Closing issue since the fix has been merged into master
Noticed that whatever I tried I couldn't get the legacy hack to work with my racedayquads mach 2 vtx using a known good configuration (on my omnibus pro corner f4). I was also using softserial to get it working but this wasn't a problem before.
Reproducible by attempting to make the akk_hack setting work with any (i'd guess) mach 2 vtx and attempting smart audio control via osd. sometimes you can actually see the menu to choose channel / power level but setting those values doesn't actually change the vtx.
This was on the 3.4.1 release of butterflight.
I know this bug is not hardware related because I forked butterflight, checked it out, ran
git revert -m 1 30f3152
(this is the merge commit for the betaflight pr that breaks mach 2 compatability) built this and flashed it to my pro corner and it worked like a charm even over soft serial. I of course ran into some conflicts but I always chose the incoming changes in those 3 cases and had no trouble building. Of course I may have broken some stuff like setting power level on disarm and setting custom frequency but I think it's evidence enough this feature may require some more attention.here's my diff: