Skip to content

Commit

Permalink
fix calibrate, PrimedStart, switches, add vr
Browse files Browse the repository at this point in the history
  • Loading branch information
SK21 committed Feb 15, 2024
1 parent 1d14954 commit a60e512
Show file tree
Hide file tree
Showing 41 changed files with 1,013 additions and 655 deletions.
6 changes: 6 additions & 0 deletions RateAppSource/RateController/Classes/UDPcomm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;

Expand Down Expand Up @@ -167,6 +168,11 @@ private void HandleData(int Port, byte[] Data)
case 33152: // AOG, 0x81, 0x80
switch (Data[3])
{
case 228:
// vr data
mf.VRdata.ParseByteData(Data);
break;

case 235:
// section widths
mf.SectionsPGN.ParseByteData(Data);
Expand Down
4 changes: 3 additions & 1 deletion RateAppSource/RateController/Classes/clsCalibrate.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using AgOpenGPS;
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace RateController
Expand Down Expand Up @@ -74,6 +75,7 @@ public void Close()
cProduct.Enabled = true;
cProduct.ConstantUPM = ConstantUPMstart;
cProduct.Save();
cProduct.CalUseBaseRate = false;
}

public Label Description
Expand Down Expand Up @@ -384,6 +386,7 @@ private void CMeasured_Validating(object sender, System.ComponentModel.CancelEve
private void CPower_Click(object sender, EventArgs e)
{
cEnabled = !cEnabled;
cProduct.CalUseBaseRate = cEnabled;
Update();
}

Expand Down Expand Up @@ -433,7 +436,6 @@ private bool MeterIsSet()
if (cProduct.RateSet > 0)
{
double Ratio = Math.Abs(cProduct.RateSet - cProduct.RateApplied()) / cProduct.RateSet;

if (Ratio < 0.1)
{
SetCount++;
Expand Down
Loading

0 comments on commit a60e512

Please sign in to comment.