Skip to content

Commit

Permalink
MagCalib: ensure we start from a valid state
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Dec 2, 2017
1 parent 19c7a80 commit c123390
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions MagCalib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,21 @@ static void prd_DoWork(object sender, ProgressWorkerEventArgs e, object passdata
bool havecompass2 = false;
bool havecompass3 = false;

if (MainV2.comPort.MAV.param.ContainsKey("COMPASS_OFS_X"))
{
MainV2.comPort.setParam("COMPASS_OFS_X", 0, true);
MainV2.comPort.setParam("COMPASS_OFS_Y", 0, true);
MainV2.comPort.setParam("COMPASS_OFS_Z", 0, true);

MainV2.comPort.setParam("COMPASS_DIA_X", 1, true);
MainV2.comPort.setParam("COMPASS_DIA_Y", 1, true);
MainV2.comPort.setParam("COMPASS_DIA_Z", 1, true);

MainV2.comPort.setParam("COMPASS_ODI_X", 0, true);
MainV2.comPort.setParam("COMPASS_ODI_Y", 0, true);
MainV2.comPort.setParam("COMPASS_ODI_Z", 0, true);
}

//compass2 get mag2 offsets
if (MainV2.comPort.MAV.param.ContainsKey("COMPASS_OFS2_X"))
{
Expand Down
2 changes: 1 addition & 1 deletion MissionPlanner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<OutputType>Exe</OutputType>
<StartupObject></StartupObject>
<Authors>Michael Oborne</Authors>
<Version>1.3.50.12</Version> <DebugType>full</DebugType>
<Version>1.3.50.13</Version> <DebugType>full</DebugType>
<Company>Mission Planner</Company>
<Product>Mission Planner</Product>
<Description>Mission Planner ground control station for ardupilot</Description>
Expand Down

0 comments on commit c123390

Please sign in to comment.