use memset rather than explicit assignments to zero to zero an array, this saves code space.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1340 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
da957cf50d
commit
973879501b
@ -15,9 +15,7 @@
|
|||||||
AP_Compass_HIL::AP_Compass_HIL() : orientation(0), declination(0.0)
|
AP_Compass_HIL::AP_Compass_HIL() : orientation(0), declination(0.0)
|
||||||
{
|
{
|
||||||
// mag x y z offset initialisation
|
// mag x y z offset initialisation
|
||||||
offset[0] = 0;
|
memset(offset, 0, sizeof(offset));
|
||||||
offset[1] = 0;
|
|
||||||
offset[2] = 0;
|
|
||||||
|
|
||||||
// initialise orientation matrix
|
// initialise orientation matrix
|
||||||
orientation_matrix = ROTATION_NONE;
|
orientation_matrix = ROTATION_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user