Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR alignes the trajectory memory on 4 byte boundaries. This fixes a part of a problem that has become visible with V12 of the compiler.
The root problem is that the trajectory memory is defined as a uint8 array, when a trajectory is read, a pointer into the array is cast to a struct containing floats. Floats must be aligned and If the array is not aligned properly we get a hardfault. Most likely the array has (by chance) been aligned by the old compiler, but V12 does not and we get a hard fault.
There is still a secondary problem that this fix does not solve. It is possible to upload trajectories to an abitrary offset which can still mess up the alignment