Skip to content

Commit

Permalink
is Section Headland controlled
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerbriantee committed Oct 31, 2021
1 parent 2ce7b14 commit f354510
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 9 deletions.
1 change: 1 addition & 0 deletions SourceCode/GPS/Classes/CBoundary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public CBoundary(FormGPS _f)
boxLength = 2000;
turnSelected = 0;
isHeadlandOn = false;
isSectionControlledByHeadland = Properties.Settings.Default.setHeadland_isSectionControlled;
}
}
}
3 changes: 2 additions & 1 deletion SourceCode/GPS/Classes/CHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ namespace AgOpenGPS
public partial class CBoundary
{
public bool isHeadlandOn;
public bool isToolInHeadland, isToolOuterPointsInHeadland;
public bool isToolInHeadland,
isToolOuterPointsInHeadland, isSectionControlledByHeadland;

public void SetHydPosition()
{
Expand Down
24 changes: 22 additions & 2 deletions SourceCode/GPS/Forms/FormHeadland.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions SourceCode/GPS/Forms/FormHeadland.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ private void FormHeadland_Load(object sender, EventArgs e)
isA = true;
isSet = false;

cboxIsSectionControlled.Checked = mf.bnd.isSectionControlledByHeadland;

lblHeadlandWidth.Text = "0";
lblWidthUnits.Text = mf.unitsFtM;

Expand Down Expand Up @@ -567,6 +569,11 @@ private void btnExit_Click(object sender, EventArgs e)
{
mf.bnd.bndList[0].hdLine?.Clear();

//does headland control sections
mf.bnd.isSectionControlledByHeadland = cboxIsSectionControlled.Checked;
Properties.Settings.Default.setHeadland_isSectionControlled = cboxIsSectionControlled.Checked;
Properties.Settings.Default.Save();

//middle points
for (int i = 1; i < hdArr.Length; i++)
{
Expand Down
12 changes: 6 additions & 6 deletions SourceCode/GPS/Forms/OpenGL.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions SourceCode/GPS/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions SourceCode/GPS/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,8 @@
<Setting Name="setBrand_WDBrand" Type="AgOpenGPS.WDBrand" Scope="User">
<Value Profile="(Default)">AGOpenGPS</Value>
</Setting>
<Setting Name="setHeadland_isSectionControlled" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
3 changes: 3 additions & 0 deletions SourceCode/GPS/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@
<setting name="setBrand_WDBrand" serializeAs="String">
<value>AGOpenGPS</value>
</setting>
<setting name="setHeadland_isSectionControlled" serializeAs="String">
<value>True</value>
</setting>
</AgOpenGPS.Properties.Settings>
</userSettings>
</configuration>

0 comments on commit f354510

Please sign in to comment.