inav icon indicating copy to clipboard operation
inav copied to clipboard

EZUHF INAV RSSI

Open rcabuser opened this issue 8 years ago • 36 comments

If your issue looks like a hardware fault or a configuration problem please don't raise an issue here.

Please consider using other user support options such as asking the manufacturer of the hardware you are using, RCGroups, Slack or other user support forums & groups (e.g. facebook).

Board and Version

_Board name goes here. INAV kit from Banggood https://www.banggood.com/Inav-F3-Deluxe-30_5x30_5mm-Flight-Controller-Integrated-with-M8N-GPS-Compass-Baro-OSD-for-RC-Drone-p-1162872.html?rmmds=myorder&cur_warehouse=CN _Version of INAV used goes here_1.9

Use CLI command version and put its output here

If it's a custom-compiled firmware please mention this

Behavior

  • When setting up RSSI trough PPM on 4ch. lite EZUHF the RSSI when radio is on shows 100%, when i turn radio off it only drops to around 50%.
  • Steps needed to reproduce the problem
  • Expected Results
  • Actual Results

Is this a new feature request?

Blackbox logs/Config (.ZIP) where problem occurs

_Go to CLI, execute dump command copy its output to PasteBin and provide a link to a paste here.

Upload a zipped blackbox log (if available)

rcabuser avatar Mar 09 '18 20:03 rcabuser

I suspect you may want to mentioned this here: https://www.rcgroups.com/forums/showpost.php?p=36002593&postcount=8650

I also have the same problem with EZIHF RX's.

Nandox7 avatar Mar 11 '18 02:03 Nandox7

Is that your post on Rcgroups?

rcabuser avatar Mar 11 '18 08:03 rcabuser

Nop not mine. But I also use EzUHF and that is annoying.

Nandox7 avatar Mar 11 '18 20:03 Nandox7

Agree, very annoying:-(

rcabuser avatar Mar 12 '18 12:03 rcabuser

Ok, looked into the code and the RSSI scaling is a bit messy.

Has I noticed it applies to both PWM and ADC readings but don't see it making much sense to PWM type. Range is 0 to 255 and that only makes sense when you using ADC, PWM will range from 1000 to 2000. I'd say that for PWM reading it would be best to have a min and/or max value setting. MwOSD does that using the calibration step where it record the min and max read value but for iNav we could do it manually using a cli param.

Something like: rssi_pwm_min rssi_pwm_max

I'm playing with the code and will test it soon.

Nandox7 avatar Mar 12 '18 16:03 Nandox7

Yes the RSSI scaling is also applied for the value coming from RC channels. It makes sense because not all radios send 1000 for 0% signal and 2000 for 100% signal like you are experiencing yourself. The value used from the RC channel is offset it is not the 1000-2000 range that is scaled but 0-1000 which is logical (https://github.com/iNavFlight/inav/blob/master/src/main/rx/rx.c#L454).

What you need is offset the PWM RSSI value sent by your radio by -500 looks like. Or you can change the scaling to a different method like you described with min/max values.

shellixyz avatar Mar 12 '18 16:03 shellixyz

I think this has something to do with failsafe, like it goes back and holds at around 1500 when turning radio off, without going all the way down/up. When you use the internal module in taranis together with an frsky receiver, you can set up e.g. channel 8 for rssi under "inputs" setting and set the range there but when you use an external module on the radio, the rssi choice is not present under "inputs" :-(. This frustrates the hell out of me. It would have been fantastic to have a possibility to tweak this manually as mentioned above.

rcabuser avatar Mar 12 '18 16:03 rcabuser

Yes that is the way to go. The current scaling is only useful I'd expect for ADC where the reading may be within a quit small range.

For PWM it should always be within the expected range, if not that code will set the constrain rules, but it misses an offset.

I wonder if it would be easier to just set for both PWM and ADC RSSI a min/max value and have the code do the mapping. This way there is no need for an offset or scaling as it will automatically take care of both.

I'll try this later, need to see if I have some RX that used Analog format for the RSSI.

Nandox7 avatar Mar 12 '18 17:03 Nandox7

Good work:-) yeah i find the scaling as it is now is not much help in. I'm very excited to hear further on how it goes.

rcabuser avatar Mar 12 '18 18:03 rcabuser

Nandox7, have you been able to do any testing??

rcabuser avatar Mar 15 '18 19:03 rcabuser

Just some basic testing and seems to be working. Need to try this outside so that I can get values other than min and max and that will happen only during the weekend.

I'm making a few more changes to the code, but if it works well it will be easy to set, for RSSI from ADC or PWM.

Nandox7 avatar Mar 16 '18 01:03 Nandox7

that's absolutely fantastic, i'm very interested in hearing further:-)

rcabuser avatar Mar 16 '18 01:03 rcabuser

Tried again today and seems ok, at least detects correctly full and no signal, so better than before. Now I need to attenuate the signal to get middle range values and that is hard!

The damm EzUHF punches throw the wall like a cannon. :) I don't have attenuator for this frequency so only option is to really do the test outdoors.

Nandox7 avatar Mar 16 '18 20:03 Nandox7

Ahh great:-) i really hope it works well with the outdoor test.

rcabuser avatar Mar 16 '18 21:03 rcabuser

Hi! did you manage to do any more testing through the weekend?

rcabuser avatar Mar 19 '18 18:03 rcabuser

Hey not much, snow storm during the weekend and it was too windy to be outside. I did made some tests indoors but I can't reduce signal strength.

I'm adding now some debug information o that I can to log data and see if I notice small variations of the RSSI that may not translate to a % change.

Nandox7 avatar Mar 20 '18 16:03 Nandox7

Ah ok, same crap weather as over here. Please post when you have had the possibility to test this:-)

rcabuser avatar Mar 20 '18 21:03 rcabuser

can someone help me get my ezuhf 4ch. lite to work with my F4 V2 board? I cant even get receiver values to register. thanks.

subiblue2002 avatar Mar 23 '18 00:03 subiblue2002

Is there a solution to this yet, I am experiencing the same problem. 100% Rssi -> Turn off EzUHF Tx -> ~56% RSSI...

alfawhaaat avatar Apr 17 '18 08:04 alfawhaaat

I just set my EZUHF receiver to use "Link Quality".....not... RSSI.....it works ok....Full signal gives a value around 78.....no signal....zero.....inside iNAV OSD....i never worry about range using EZUHF anyway, not with Dipole on my receiver and SR771 on my TX....:)

EnglishTurbines avatar Apr 18 '18 11:04 EnglishTurbines