Skip to content

Commit

Permalink
fix stupid global var usage on a listener
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnpascual committed Apr 7, 2023
1 parent 8f0e19e commit eb0f0c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ToF_Fishing_Bot/FishingThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void Start()
0));
}));

Mat frame = ExtractCroppedFrame();
Mat frame = ExtractCroppedFrame(bmp);
var middleBarPos = GetMiddleBarAveragePos(frame);
var fishingCursorPos = GetFishingCursorPos(frame);
/*cursorLabel.Dispatcher.Invoke(new Action(() => { cursorLabel.Content = fishingCursorPos.ToString("0.##"); }));
Expand Down Expand Up @@ -229,9 +229,9 @@ public void Start()
screenStateLogger.Start();
}

private Mat ExtractCroppedFrame()
private Mat ExtractCroppedFrame(Bitmap image)
{
var cropped = bmp.CropSmall(
var cropped = image.CropSmall(
settings.UpperLeftBarPoint_X,
settings.UpperLeftBarPoint_Y,
settings.LowerRightBarPoint_X - settings.UpperLeftBarPoint_X,
Expand Down

0 comments on commit eb0f0c3

Please sign in to comment.