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

Wie sieht es mit folgender Konstruktion aus?

Ich habe ein Array aus Bricks/Bricklets. Darin werden alle relevanten Werte zu jedem Brick gespeichert. Als Beispiel :

 

struct MyD {
int  TinkerDevIDNr;	// Das ist die Nummer des Device Identifiers, KEINE laufende NR.!!!
char TinkerName[LN];
char TinkerShortName[sN];
char TinkerUID[CL];	// Das ist die UID 

};

 

Wenn ich jetzt etwa 4 Linearpotis habe, würden diese alle über die gleiche Funktion eingestellt werden, also etwa : 

 

void initPOTI( Device MD ) 
{
POTI_Einstellungen(MD);
}

void POTI_Einstellungen ( Device MD )
{
linear_poti_register_callback(&MD, LINEAR_POTI_CALLBACK_POSITION, POTIDaten, NULL);
linear_poti_set_position_callback_period(&MD, 10000);

}

 

Da sich unter Device MD immer eine anderes Device verbirgt, wie ,sieht es da mit den Callbacks aus? ( Auch hier gibt es ja das Device )

Werden dann 4 Threads für die 4 Potis gestartet? Dann sollten doch auch die Callbacks völlig getrennt voneinander laufen und unterschiedlichste Ergebnisse liefern oder?

 

 

Geschrieben

Nein, nicht jedes Device hat einen Callback Thread, sondern jede IP Connection. Wenn du deine 4 Linear Potis über die gleich IP Connection ansprichst, dann werden deren Callbacks über den einen Callback Thread der einen IP Connection ausgeliefert.

Geschrieben
  • Autor

OK, verstanden. Das heisst aber auch, dass der Callback vier mal ausgelöst wird, da ich ihn ja jedesmal mit einer anderen DeviceID angelegt habe? ( Jetzt im Beispiel bei 4 Potis ?? )

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.