[1.1.0] ObserveScanRate without any function

Bug #1540233 reported by angelo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Invalid
Undecided
Unassigned

Bug Description

Hi,

as far as I understood from the documentation the properties WaitScanRate and ObserveScanRate should be the same function. But ObserveScanRate does not change anything in my case but WaitScanRate behaves as expected. Even worse is that only the ObserveScanRate can be set for a region.

Here is my test.

public class SikuliTest {

 public static void main(String[] args) {
  try {

   // Settings.WaitScanRate = 0.1f; // Does work
   // Settings.ObserveScanRate = 0.1f; /Does not work

   Region searchRegion = new Screen();

   searchRegion.setObserveScanRate(0.1f); // Does not work

   Long startingTime = System.currentTimeMillis();
   Match match = searchRegion.wait("cancel_button.png",
     Constants.FOREVER);
   match.click();
   System.out.println("Thread1: "
     + (System.currentTimeMillis() - startingTime) + "ms");

  } catch (FindFailed e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
 }
}

If I bring the desired target to the screen after the program started I get always a similar reaction time.

[log] CLICK on L(280,194)@S(0)[0,0 2560x1440]
Thread1: 4157ms

With 0.1f I would have expected that Sikulix searches every 10 seconds with a lower CPU usage, but it is always the same. It has also no effect if I set the observe scan rate via the global settings. Only Settings.WaitScanRate behaves as expected.

Edited on 03-02-2016, when I realized the difference between WaitScanRate and ObserveScanRate.

angelo (angelo-j)
description: updated
description: updated
summary: - Region.setObserveScanRate(float observeScanRate) without any function
+ ObserveScanRate without any function
angelo (angelo-j)
summary: - ObserveScanRate without any function
+ ObserveScanRate vs. WaitScanRate
description: updated
description: updated
summary: - ObserveScanRate vs. WaitScanRate
+ [1.1.0] ObserveScanRate vs. WaitScanRate
summary: - [1.1.0] ObserveScanRate vs. WaitScanRate
+ [1.1.0] ObserveScanRate without any function
Revision history for this message
angelo (angelo-j) wrote :
Changed in sikuli:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.