semerad / gt3b

Alternative firmware for FlySky radio FS-GT3B and clones
GNU General Public License v3.0
75 stars 75 forks source link

Dig not working properly #3

Closed losikid closed 13 years ago

losikid commented 13 years ago

I found a real bug :) anyways when in dig mode (3ch 0.3.2) everything is fine at 0% even mix, but when the mix% is increase/decrease either the front or rear esc will change speed with no throttle applied.. It seems like 1% for every 10%, but thats just guessing.

I had my keys setup so ch3 trim was mom with prv to control dig, and d/r was res with a 20% step controlling dig, ch3 button was off.

I'll play with different combos and such and see if its just the settings i used, possibly mom or prv isn't written right...as thats the only new stuff i'm tryiing compared to 0.2.0

losikid commented 13 years ago

Ok it did it in 0.2.0 too, so i programmed both the programmed and data memory as all zero's, then opened up 0.3.2 and programmed it. Still doing it

I also noticed when i go into sub trim menu and arrow over 3 the rear esc will go the same speed if i was to do 100% dig.

Maybe theres something wrong with my radio...but how would hardware be causing this?

Also it does that strange speed thing to the channel thats supposed to be held at neutral, center. and not mixed with the trigger, the one mixed with the trigger speeds and slows with the trigger. So maybe my trigger's pot isn't centered and the calibrate feature isn't wanting to work right, or...so when not mixed to the trigger it goes to proper center...make sense?

losikid commented 13 years ago

Ok so with my esc's still calibrated to the even mix, i turned the dig off, and set my ch 3 trim to control ch 3 with a 5% step, the rear esc stops at like 30%

So this tells me that the calibrate feature works, but since the trigger is not 50/50 it doesn't know what center is.

Strange thing though is that it didn't do this with the radio i tested 0.2.0 and i think 0.3.2 dig features with it as well, but i sold that radio and reprogrammed a new one.

So i am alittle confused why this one is doing it.

losikid commented 13 years ago

I just plugged in castle link and my neutral point is is ~1.35ms the radio i was using before this was calibrating at 1.45ms (i know this because i was troubleshooting some new code for my wantamix)

So this would explain why i'm having problems (i'm 30% throw away from center), for some reason the the radio isn't converting the 70/30 trigger into a 50/50 channel...am i calibrating wrong, i pull back, to full throttle, let sit for a second, let off to center, let sit for center, go to full reverse, let sit for a second and while holding reverse i press enter. Do i need to press enter at each interval or let off reverse before i press enter?

Or is the pot not supposed to be linear but i got a linear pot due to poor qc

semerad commented 13 years ago

I found a real bug :) anyways when in dig mode (3ch 0.3.2) everything is fine at 0% even mix, but when the mix% is increase/decrease either the front or rear esc will change speed with no throttle applied.. It seems like 1% for every 10%, but thats just guessing.

For me it looks like You have badly calibrated throttle :-) .

When the throttle position is read, it is converted to value in range -5000...5000 with 0 in centre position. And when some DIG mixing is applied, that throttle value is multiplied by some amount percent (100 - DIGmix for plus values). And 0 multiplied by any number is always 0 :-) . But if throttle is badly calibrated, it is not 0 at centre and this value will change when DIG mix is applied. This code is very simple, You can look to file calc.c to line 321 how it is programmed. Or there must be some BUG at compiler :-).

losikid commented 13 years ago

So how do i properly calibrate it? Because i've been trying.

losikid commented 13 years ago

but yes i think the code is fine, as i know 0.2.0 worked fine and now its not on this new one

semerad commented 13 years ago

So how do i properly calibrate it? Because i've been trying.

At my unit throttle didn't always return back to the same position. I solve this with calibration and setting dead zone. Maybe some HW mod can be done to get it more precise.

losikid commented 13 years ago

But my rx is seeing nowhere near 1.5ms, its at 1.35ms at netrual, i don't thing dead zone will work...not sure what you mean by HW mod.

semerad commented 13 years ago

but yes i think the code is fine, as i know 0.2.0 worked fine and now its not on this new one

But this code, which computes DIG mix, didn't changed (actually some constants was changed but this was done at multiply and divide sides which didn't changed sense). And can You try to set bigger throttle dead zone and test it again ?

losikid commented 13 years ago

Well, i honestly don't know what i did different, but its working right now, i completely erased everything on the chip (programmed in 0's) and reflashed it with 0.3.2, turned it on calibrated it, re bound it to the rx, programmed for dual esc, calibrated my esc's and it worked fine...i did this like 5 times last night, and i don't know what i just did differently,

Maybe i was just really tired last night and was doing the calibration procedure wrong and didn't realize it....but at first i thought it was a bug, until i realized 0.2.0 was doing it too. So sorry for opening up an issue.

semerad commented 13 years ago

But my rx is seeing nowhere near 1.5ms, its at 1.35ms at netrual,

This is very strange. I have it at 1.5ms .

i don't thing dead zone will work...

not sure what you mean by HW mod.

Nothing specific. I don't know if it is possible to do some HW mod to get more precise centre position (stronger springs, ...).

losikid commented 13 years ago

Yea that was my problem, for some reason last night the radio wasn't excepting center calibration, so with a 70/30 trigger, i got a 70/30 channel because of no center calibration.

I did notice though that i got a loud beep when i did long enter today, i don't remember a loud beep last night, so maybe it wasn't saving my calibration.