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.

ipcon_register_callback kann meine Callback nicht registrieren

Featured Replies

Geschrieben

Hi zusammen,

erhalte bei der Funktion folgenden Fehler:

cannot convert argument of incomplete type void * to void(*)()

folgender Aufruf:

 ipcon_register_callback(&ipcon,IPCON_CALLBACK_ENUMERATE,(void *)cb_enumerate_static ,this);

Funktion im Header wie folgt definiert:

static void cb_enumerate_static(const char *uid, const char *connected_uid,
                                        char position, uint8_t hardware_version[3],
                                        uint8_t firmware_version[3], uint16_t device_identifier,
                                        uint8_t enumeration_type, void *user_data);

Hat jemand eine Idee was ich da falsch mach?

Programmiert wird in QT mit C++

Falls ihr noch mehr Infos bräuchtet bitte einfach melden.

Danke schon mal vorab für eure Hilfe!

Viele Grüße

Paul

Geschrieben

Hi Paul!

Der Callback ist richtig definiert. Ist cb_enumerate_static() Teil einer Klasse oder ist es eine Funktion außerhalb?
Wenn ersteres zustimmt, dann versuch mal folgendes:

// register enumeration callback
ipcon_register_callback(&ipcon, IPCON_CALLBACK_ENUMERATE, (void (*)(void))cb_enumerate_static, this);

 

bearbeitet von cl-

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.