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

HDG info not sent to Micronet? #50

Closed
frgaude opened this issue Nov 14, 2022 · 13 comments
Closed

HDG info not sent to Micronet? #50

frgaude opened this issue Nov 14, 2022 · 13 comments

Comments

@frgaude
Copy link
Contributor

frgaude commented Nov 14, 2022

Hi Rodem, there seems to be a regression with the lastest batch of commits:
I used to get the heading info on my displays, it's no longer showing with current "master".
the HDG info still shows in the NMEA feed.

same behavior with or without compass calibration.

GPS COG & SOG are displayed ok.

(not sure exactly which version I was using before: pre-databridge was working for sure but I think also after the first databridge commits)

NMEA.log
Tacktick displays

@Rodemfr
Copy link
Owner

Rodemfr commented Nov 14, 2022

I just made changes on this area in the latest commits, I will check it tonight. It should be easy to fix.

@Rodemfr
Copy link
Owner

Rodemfr commented Nov 14, 2022

Mag heading is working on my setup. When I look to the modifications I have done, I suspect a possible problem.
First, I found a few problems but I made an error with my git and I pushed the fix directly in master... So you can test it directly in master branch.
Secondly, If it does not work, you can also reset the heading offset and magnetic variation with your display or remote (in compass option page). Even if these two values are already set at zero, it is important to reset them again so that MicronetToNMEA can see them pass on the network and store it into EEPROM.
Let me know the result.

@dwarning
Copy link
Collaborator

Only 1 cent from my side:
Heading self is working with latest master, see the correct nmea sentences. But no display values.
All calibration settings disappears and setted to 0. Also for different older version. Perhaps the EEPROM content/addresses changed.

@frgaude
Copy link
Contributor Author

frgaude commented Nov 14, 2022

still no luck with the latest changes.

I'll revert to an older version to double check.
I might be able to publish some micronet logs from a 2nd board (an esp32 with a cc1101 :-) )

And to clarify my situation with magnetic calibration: until this evening, it was set to 0 on the various elements I have at home (MTN board and the two displays are not yet in use on the boat).

I did a calibration after I experienced the issue. to be in a more "by-the-book" situation.

I'll also redo the calibration and check the parameters on the micronet display.

thanks for the great support!

@frgaude
Copy link
Contributor Author

frgaude commented Nov 14, 2022

I went back to the merge of pull request #42 and ... the magnetic heading info is displayed.

one thing to note: in this version and versions prior to the rework on the RF driver, the calibration of my CC1101 board was really skewed to the low end of the spectrum:

.*******.............................................................................................. Frequency = 869701.94kHz Range = 17.94kHz Deviation to real frequency = -138.06kHz Do you want to save the new RF calibration values (y/n) ? Configuration saved

RF calibration is more "centered" with the latest code:

.......................************************....................................................... Frequency = 869793.19kHz Range = 68.79kHz Deviation to real frequency = -46.81kHz (-53 ppm) Do you want to save the new RF calibration values (y/n) ? Configuration saved

so maybe, somehow, my CC1101 is causing this...

@frgaude
Copy link
Contributor Author

frgaude commented Nov 14, 2022

pinpointed to this commit (works before, stops working after):
MTN_commit_issue50

Using a teensy 3.5 + CC1101 + LSM303DLHC + GNSS M8N (+ Wifi bridge deactivated for these tests)
with 4 Micronet devices (2 dual maxi display, 1 wind display, 1 remote)
-> I will do one last test to shield 3 devices and keep only one

@frgaude
Copy link
Contributor Author

frgaude commented Nov 15, 2022

still not working when only switching on the wind display (0x83037899).
maybe the cause is the # of paired devices, as they are stored.

2022-11-15 00_58_12-COM4 - Tera Term VT

vs

2022-11-15 00_57_25-COM4 - Tera Term VT

@dwarning
Copy link
Collaborator

Code recover is not easy because @Rodemfr mixed code changes with commenting and formatting in same commits.

Similar setup:
teensy 4.1 + CC1101 + LSM303DLHC + GNSS M8N (+ Wifi bridge not used) + 1x MN 100-2

Playback to commit 97819d was not sufficient to get headings on display.
Can confirm that playback to commit 598f02 brings the hdg values back. Same as your results.

@frgaude
Copy link
Contributor Author

frgaude commented Nov 15, 2022

found it :-) !

2022-11-15 06_41_44-Automatically handle multiple slaves · Rodemfr_MicronetToNMEA@b97ad09

I'm sincerly impressed by the work of Rodemfr, clean code, refactoring whenever he feels it's needed, deep diving into the intricacies of the radio datasheets to get everyting right, great documentation, etc...

So spotting the ittle copy paste errors here and there is the least I can do (and also the only thing I'm able to do :-) )

frgaude added a commit to frgaude/MicronetToNMEA that referenced this issue Nov 15, 2022
@Rodemfr
Copy link
Owner

Rodemfr commented Nov 15, 2022

Excellent work ! I will look at it calmly tonight and review a bit what I did...

Rodemfr added a commit that referenced this issue Nov 15, 2022
fix issue #50 HDG info not sent to Micronet
@Rodemfr
Copy link
Owner

Rodemfr commented Nov 15, 2022

If you confirm me that it is now OK with this issue, I will close it.

@frgaude
Copy link
Contributor Author

frgaude commented Nov 15, 2022 via email

@Rodemfr Rodemfr closed this as completed Nov 15, 2022
@Rodemfr
Copy link
Owner

Rodemfr commented Nov 16, 2022

I went back to the merge of pull request #42 and ... the magnetic heading info is displayed.

one thing to note: in this version and versions prior to the rework on the RF driver, the calibration of my CC1101 board was really skewed to the low end of the spectrum:

.*******.............................................................................................. Frequency = 869701.94kHz Range = 17.94kHz Deviation to real frequency = -138.06kHz Do you want to save the new RF calibration values (y/n) ? Configuration saved

RF calibration is more "centered" with the latest code:

.......................************************....................................................... Frequency = 869793.19kHz Range = 68.79kHz Deviation to real frequency = -46.81kHz (-53 ppm) Do you want to save the new RF calibration values (y/n) ? Configuration saved

so maybe, somehow, my CC1101 is causing this...

This is normal, this is one of the issues fixed in the various pull requests. MicronetToNMEA was not setting the frequency correctly. The error was compensated by the frequency calibration but the rror in ppm was wrong. Now, your value of 53ppm is correct and really shows the error of your XTAL.

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

3 participants