"sensor lost" with FPort when GPS fix captured
FPort telemetries are fine before GPS fix (i.e. not enough satellite signal captured) Taranis telemetry screen show "*" in all data except those GPS related, which indicate data is received.
When GPS fix, GPS related fields get "*"s, but others are gone, and taranis reported sensor lost after some period of time. Telemetries other than GPS related data occasionally receive updates, therefore taranis keep shouting "sensor lost"
Reproduced on the bench. Working on a fix.
@lo4wai seems like not sending a sensor every 3 cycles workarounds the problem. Tested with 4, 5 and 6 too, but anything > 3 still causes some sensor lost alarms on my radio when using an XSR.
@fiam glad to see your work around, I will try to build it when I have time. I have read the code before but can't figure out why the GPS_FIX state will trigger the problem. In fact the problem also occurs occasionally even without GPS_FIX, but with a much lower frequency.
With your fix, I wonder if the problem is related to the baud rate, since FPort is running with 115200 but smart port is 57600.
Tried the work around and it works! Thanks for the fix.
I have also the sensor lost massage with GPS fix, must i wait for INAV 2.0 or is there an update earlier?
My hunch is that the telemetry bandwidth from the RX to the TX doesn’t have a data rate big enough to support sending one sensor packet every 9ms. Before 2.0, the GPS related sensors where only sent once the fix was acquired, so the RX could cope with that because there were some pauses in the FC->RX stream (the slot for the GPS data was reserved but not used). Once a GPS fix was acquired, we started sending a sensor on almost every 9ms cycle and the buffer in the RC eventually got full, causing some of the sensors to be discarded by the RX.
Forgot to mention that using Smarport would send a sensor to the RX from the FC every 22ms, that’s why we didn’t have this problem until we started supporting FPort.
i'm trying to make my own build with this fix in it. I'm github/code rookie.
is this the process? git clone https://github.com/iNavFlight/inav/ cd inav
go to local directory where it downloaded (devtools/inav) navigate to telemetry (devtools\inav\src\main\telemetry) open smartport.c add in the lines of code with a text editor save
back to bash
make TARGET=MATEKF405
i did all that, flashed my new hex and still have sensor lost. Do i need to be in a different dir before i do the make?
thank you for the help, it's been a long week of trying to figure this stuff out.
i use
git cherry-pick 3625f05 to get the code after cd to inav directory
then build as usual with docker
I think i got it working, thank you very much.
i did lose gps telemetry for a moment here and there, but i need to test more.
@P-I-Engineer I don't have any of those receivers. Try editing smartport.c and changing SMARTPORT_REST_PERIOD from 3 to 2.
@lo4wai Which RX did you test with?
i edited my comment before, think it wasn't working because of my lack of github skills.
i just tested with a X4r, i'll try with a r-xsr later this afternoon.
@fiam I'm using R-XSR With SMARTPORT_REST_PERIOD set to 3, it still report sensor lost occasionally. With 2, no further lost
@lo4wai Thanks for testing. I'll make a new PR that introduces this workaround only for FPort, since we're effectively reducing the bandwidth of the sensors by 33% I'd rather not add the extra delay for SmartPort too.
i flew today for a 30 minutes, no sensor lost warnings
i'm using SMARTPORT_REST_PERIOD set to 2
This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. This issue / pull request will be closed if no further activity occurs within two weeks.
Automatically closing as inactive.