Jump to content

io4-v2-bricklet Fehler beim Setzen von set-input-value-callback-configuration


theo

Recommended Posts

Hallo TF-Team,

 

wenn ich mit dem Java-Binding versuche die InputValueCallbackConfiguration des io4V2 zu setzen, bekomme ich folgende Fehlermeldung:

error: got invalid parameter for function 6

 

Die Gegenprüfung mit dem shell-Binding zeigt das gleiche Problem:

air:tinkerforge theo$ ./tinkerforge call io4-v2-bricklet G2j set-input-value-callback-configuration 1 500 false
tinkerforge call io4-v2-bricklet <uid> set-input-value-callback-configuration: error: got invalid parameter for function 6

 

Gruß,

Theo

Link to comment
Share on other sites

Hab gerade kurz in den Code geschaut, es gibt zwei Checks in der Funktion:

 

if(data->channel > NUMBER_OF_CHANNELS - 1) {

return HANDLE_MESSAGE_RESPONSE_INVALID_PARAMETER;

}

 

if(io4.channels[data->channel].direction != IO4_V2_DIRECTION_IN) {

return HANDLE_MESSAGE_RESPONSE_INVALID_PARAMETER;

}

 

Der zweite Check ist hier wahrscheinlich das Problem. Die Funktion geht hier davon aus, dass der Kanal zuvor bereits auf Input konfiguriert wurde.

 

Das scheint mir ein wenig strikt zu sein, ich bin mir gerade nicht sicher ob das notwendig ist. Muss ich mir im Detail anschauen.

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...