Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 45653

Variable resets randomly

$
0
0

@SylvanH wrote:

Good afternoon,

I am working on a customized version of Ardurover (from the 3.0.1 version). I added libraries to handle my own communication protocol and modified others (like AP_Mission) and I come here because I have a very weird issue.

As information, I work with Eclipse environment from the PX4 toolchain.
My problem is as follow :
- In AP_Mission, I added a variable mission_id. This id is saved in the EEPROM and is loaded in a private variable missionid.
-A new library AP_Modem checks the available bytes from my radio : it counts how many bytes have been received with nbbyte_received.

Up until now, missionid was 1-byte long (type uint8_t) and everything was working fine.
I want it to be 4-byte long and so I changed the type from uint8_t to uint32_t. The consequence (as far as I have diagnosed) is that the variable nbbyte_received is resetted without reason (no calls are made to the existing functions of reset).

After searching, reversing and redoing everychange one by one. The only change that generates this weird reset is changing the type of missionid from uint8_t to uint_32.

So I come here to find some explanations if there is or some advise on what to check.

I'd like to check the memory usage but I don't know how.

Thank you in advance.

Sylvan.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 45653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>