Skip to content
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

Problem with "IBUS_TYPE_S32"? #60

Closed
erwann56 opened this issue Feb 5, 2022 · 22 comments
Closed

Problem with "IBUS_TYPE_S32"? #60

erwann56 opened this issue Feb 5, 2022 · 22 comments

Comments

@erwann56
Copy link

erwann56 commented Feb 5, 2022

Thank you for your work.
The last code is better (less latency) however the telemetry for LAT, LON and ALT blocks the feedback from all sensors. When I comment out the first 3 gps sensors in IBUS.cpp, the telemetry works again. A problem with "IBUS_TYPE_S32"?

Comment
GPS with comment
GPS without comment

@dgatf
Copy link
Owner

dgatf commented Feb 5, 2022

There was some issues with IBUS types and also lat/lon were swapped. Fixed with f0f213d
Please try latest code and check if the problem persists

@dgatf
Copy link
Owner

dgatf commented Feb 5, 2022

If still doesn't work, change type to IBUS_TYPE_S16:

sensorIbusP = new SensorIbus(AFHDS2A_ID_GPS_LAT, IBUS_TYPE_S16, gps->latP(), gps);
addSensor(sensorIbusP);
sensorIbusP = new SensorIbus(AFHDS2A_ID_GPS_LON, IBUS_TYPE_S16, gps->lonP(), gps);
addSensor(sensorIbusP);
sensorIbusP = new SensorIbus(AFHDS2A_ID_GPS_ALT, IBUS_TYPE_S16, gps->altP(), gps);

Repository owner deleted a comment from Klippeneck Feb 5, 2022
@erwann56
Copy link
Author

erwann56 commented Feb 6, 2022

I tried with 2 GPS to be sure.
With the modification f0f213d, same result. All values ​​sensors are frozen at 0.
By modifying S32 by S16, the sensors work but for the GPS I have as before:
LAT, LON and SPE at 0. COG and ALT work.
I also have a compilation error (see photo).
I had tested another code some time ago. All GPS data uploaded correctly in my remote control.
(https://create.arduino.cc/projecthub/yvesmorele/low-cost-telemetry-and-data-logger-flysky-turnigy-8491d1)
error Ibus_cpp

@dgatf
Copy link
Owner

dgatf commented Feb 6, 2022

I've implemented AC packets to be able to send AFHDS2A_ID_GPS_FULL packet. Commit 924d1e6

Please try updated code

@erwann56
Copy link
Author

erwann56 commented Feb 6, 2022

Flysky
speed, cog and voltage are set to zero. Lat, Lon, Alt data are displayed but with inconsistent values
Uploading IMG_20220206_180629.jpg…

@dgatf
Copy link
Owner

dgatf commented Feb 6, 2022

Please comment lines 297 and 298 in ibus.cpp and check if cog, spd and voltage works:

//sensorIbusP = new SensorIbusGps(AFHDS2A_ID_GPS_FULL, IBUS_TYPE_GPS, gps->latP(), gps->lonP(), gps->altP(), gps);
//addSensor(sensorIbusP);

@erwann56
Copy link
Author

erwann56 commented Feb 6, 2022

I will try.
Thank you

@dgatf
Copy link
Owner

dgatf commented Feb 6, 2022

Lat, Lon, Alt data are displayed but with inconsistent values

Please post the correct values

@erwann56
Copy link
Author

erwann56 commented Feb 6, 2022

cog and voltage values ​​are ok. speed never worked.
the actual values ​​should be:
alt 202m
43.37
-0.35
flysky2

@dgatf
Copy link
Owner

dgatf commented Feb 6, 2022

This will be trial error. It is not clear the format for the multi packet for GPS

I've modified the GPS packet format.

Please flash the updated code. But this time do not connect your GPS to pin Rx, instead enable SIM_SENSORS in config.h. It will be easier for me the check the values if needed

@erwann56
Copy link
Author

erwann56 commented Feb 6, 2022

I will try tomorrow.

@erwann56
Copy link
Author

erwann56 commented Feb 7, 2022

IMG_20220207_084304
With the last code and SIM_sensors. GPS was unplugged.

@dgatf
Copy link
Owner

dgatf commented Feb 7, 2022

There was an issue in the definition of AC packets. Most likely is fixed now. Please try updated code

@erwann56
Copy link
Author

erwann56 commented Feb 7, 2022

With the last code, I have the GPS values ​​at 0. The voltage sensor is missing.
In order to confirm the hardware, I tested the other code( https://create.arduino.cc/projecthub/yvesmorele/low-cost-telemetry-and-data-logger-flysky-turnigy-8491d1). There is just a problem with the speed which must be multiplied by 100 (I tested with my car)

Other code
)
IMG_20220207_140124

@erwann56
Copy link
Author

erwann56 commented Feb 7, 2022

With SIM_SENSORS, it is the same result. GPS values ​​at 0 and the voltage, speed, cog sensors have also disappeared.

PS: MRSC_gui win does not generate lines for rpm pinion, teeth...

@dgatf
Copy link
Owner

dgatf commented Feb 8, 2022

Please try updated code. Should be ok now

@dgatf
Copy link
Owner

dgatf commented Feb 8, 2022

PS: MRSC_gui win does not generate lines for rpm pinion, teeth...

Binaries updated. Fixed

@erwann56
Copy link
Author

erwann56 commented Feb 8, 2022

I'm not at home. I will test tomorrow evening. Thank you

@erwann56
Copy link
Author

erwann56 commented Feb 9, 2022

Great!!
Values ​​are going up nicely. There is just an adjustment to be made with the GPS speed which is divided by 200 (0.2km/h instead of 40km/h).
So I will soon be able to test the BMP280 sensor (-;
Thanks again for your project.
IMG_20220209_180141

@dgatf
Copy link
Owner

dgatf commented Feb 10, 2022

There is just an adjustment to be made with the GPS speed which is divided by 200 (0.2km/h instead of 40km/h).

Speed multiplier fixed.

I've also added the number of sats for GPS.

@erwann56
Copy link
Author

erwann56 commented Feb 11, 2022

LUA TX16S
Perfect.
The speed data is correct.
If I can, I test the BMP280 this afternoon.
(Do you know if there is a LUA script or a widget that would allow to have a graphic feedback on the TX16S as in the photo?)

@dgatf
Copy link
Owner

dgatf commented Feb 11, 2022

There are several scripts lua scripts in this link

@dgatf dgatf closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants