Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo,

 

ich habe einen DistanceReachedCallback (in Java) aktiviert in etwa in der Art

ir.setDebouncePeriod(500);
ir.setDistanceCallbackThreshold('<', (short)minDistance, (short)0);
ir.addDistanceReachedListener(this);

 

Der wird auch korrekt aufgerufen, allerdings immer 2x, mein Protokoll sieht so aus:

07:57:37.917: W/System.err(2188): Set callback for distance 100
07:57:46.168: W/System.err(2188): Distance-callback call #1
07:57:46.168: W/System.err(2188): Distance-callback call #2
07:57:46.668: W/System.err(2188): Distance-callback call #3
07:57:46.668: W/System.err(2188): Distance-callback call #4
07:57:47.498: W/System.err(2188): Distance-callback call #5
07:57:47.508: W/System.err(2188): Distance-callback call #6
07:57:48.008: W/System.err(2188): Distance-callback call #7
07:57:48.008: W/System.err(2188): Distance-callback call #8
07:57:48.558: W/System.err(2188): Distance-callback call #9
07:57:48.558: W/System.err(2188): Distance-callback call #10

 

Der Zeitstempel zeigt, dass der Callback immer 2x aufgerufen wird, der Callback-Zähler geht entsprechend hoch. Bei Aufruf 5+6 war parallel noch Servo-Aktivität, wodurch sich der Aufruf dann ninimal verzögert, aber dennoch kommt. Zwischen 4 und 5 war der Abstand wohl kurzzeitig über dem Minimum.

 

Soll/muss das so sein oder muss ich noch etwas anderes setzen, damit der Callback alle 0,5 Sekunden 1x aufgerufen wird?

Geschrieben

Das ist ein bekannter Bug. Das tritt im Moment bei allen analogen Bricklets auf wenn man thresholds benutzt :-[. Ist im Git schon gefixt, wird dann beim nächsten Firmware Release wieder richtig funktionieren :).

  • 8 months later...
Geschrieben

Hi

Ich habe das selbe Problem:

Habe einen threshold callback für mein distance IR Brickelt konfiguriert und bekomme immer 2 Aufrufe von

public void distanceReached(int distance)

 

Die Distance IR firmware ist aktuell, also 2.0.0

Es gab doch da mal updates für alle Bricklets mit threshold Funktion.

Das Distance IR war aber nicht dabei. Habt ihr das vergessen?

 

http://www.tinkerunity.org/forum/index.php/topic,673.msg10882.html#msg10882

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.