-
Notifications
You must be signed in to change notification settings - Fork 3
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
observations with hardware modification u-blox and ls303dlhc #5
Comments
|
Thanks. I am sure the real programmer (I am not!) will laughing about that: anemometer.cpp line 110: string to long for 3 bytes. micronet.cpp line 39, 40: memset of complex structure for init will be complained by gcc >8.0, {} of structure members in micronet.h sufficient? Or other method available. nmea2kbridge.cpp, WaypointList has a lot of unused variables. printbuffer.h: radio.cpp: |
Attached the exception analysis. On top of the file the Serial output - later the dbug output. Seems not in your code. It happens only in verbose mode. |
That's a stack canary exception. No idea what it could want to print that's so large but you'll soon find out. To fix this increase the stack size for the printer task. In printbuffer.cpp line 16:
cDir isn't a long. It's a 3 byte character array defined on line 104 (char cDir[3];).
Have no idea what's wrong with using memset to zero out a struct. That's it's purpose.
Compilers don't see returns. It reads the line like this:
I don't see a point in adding a default case that did nothing besides code bloat.
The NMEA waypoint list is a very complex message that I had to write a phraser for. To check it was working correctly I had to print out each part. It would be added work to rewrite the function without those variables and make future debugging harder.
I'd have to see the error.
You can probably make them all consts.
It doesn't need a default value and setting one would just waste clock cycles.
You can remove it. It was for debugging radio communication with an oscilloscope.
It isn't for the cc1101 and as such isn't called when the radio is set to cc1101. Look in the Radio::Initialize() function; |
Am 17.05.22 um 17:07 schrieb mnsnoop:
Attached the exception analysis. On top of the file the Serial
output - later the dbug output. Seems not in your code. It happens
only in verbose mode.
That's a stack canary exception. No idea what it could want to print
that's so large but you'll soon find out. To fix this increase the
stack size for the printer task. In printbuffer.cpp line 16:
-xTaskCreatePinnedToCore(tfPrint, "printer", configMINIMAL_STACK_SIZE,
NULL, tskIDLE_PRIORITY, &tPrinter, 0);
+xTaskCreatePinnedToCore(tfPrint, "printer", configMINIMAL_STACK_SIZE
+ 500, NULL, tskIDLE_PRIORITY, &tPrinter, 0);
Yes, the exceptions disappear with larger stack. But it is still
unstable with long messages. Have to analyze more.
anemometer.cpp line 110: string to long for 3 bytes.
cDir isn't a long. It's a 3 byte character array defined on line 104
(char cDir[3];).
No it is not long. But see you want write "SW " into 3 byte. The space
after SW is to much, no place for 0!
line 91: iPredictedWindow no type here (int) - but it worked without!
Compilers don't see returns. It reads the line like this:
int iPacketTime = 0, iPredictedWindow = 0;
Oh, sorry I overlooked the comma. Everything OK here.
line 66 ff: no default for variable b
It doesn't need a default value and setting one would just waste clock
cycles.
But in can happen that the following switch has no valid case - then b
is not set. Better to have a default case with b=0?
I am now experimenting with radio on core 1. But so far no luck, it is
unstable.
Did not understood the approach introduced in the loop. Did that mean
that any 10 min we have an restart?
…
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMWNTGY6QEOMMNYAU7PMCDVKOY37ANCNFSM5WBQPJFA>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It's a character array, not a string. They don't need null termination.
rRadio->eOutputState can only be OS_START_PADDING_BYTE, OS_PREAMBLE, OS_SYNCWORD, OS_DATA, or OS_END_PADDING_BYTE all of which are handled by the switch.
It causes a controlled reboot every 10 minutes. Easiest way to ensure esp32Micronet can run forever. |
Last experience on a 4h boat tour was OK, but there few breaks in communication over 2-5 min. Transmission comes back alone. |
The message is transferred by synchronous serial at transmission baud on pin G0. The CC1101 provides the clock on pin MISO. |
Yes, now understood your approach, application note AN095 helped very much. I am able to decode on scope too. Any idea how I can tackle the startup problem? By scope, sdr stick and special logs? |
You can experiment with it but I found it did nothing. The crystals in NM gear did't drift enough over these short messages to go out of sync. At least not on any of the gear I had.
You've found a bug alright. I don't use network choice mode so didn't run into this issue. Your esp is starting a network and giving itself a 0 length window. When it wants to send data and needs a bigger window so it sends out 0x05 packets requesting one but we don't receive our own packets so it never gets the larger slot. I've uploaded a fix. Let me know if it works.
That shouldn't be possible as radio gets pinned to core 1 on line 212 of radio.cpp. |
… size as scheduler. We'll try to send data in the first slot which might not be valid. The first slot is normally used as a guard time between 0x01 and 0x02's. Testing needed.
I have no idea if the first window can support sending data or not. You'll have to test it as I no longer have my Micronet gear. If it doesn't work we can try giving ourselves a second slot to transmit data in. |
Thank you very much, I will check it in about 3 weeks and come back.
… Am 01.06.2022 um 04:28 schrieb mnsnoop ***@***.***>:
I have no idea if the first window can support sending data or not. You'll have to test it as I no longer have my Micronet gear. If it doesn't work we can try giving ourselves a second slot to transmit data in.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
I used the code, compiled with Arduino from branch gnss_compass together mn 100-2 display as a master, hull transducer for temp, speed and depth. In short form following remarks:
The text was updated successfully, but these errors were encountered: