Does anybody know if...

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times

Does anybody know if...

Post by Sparkoids »

...there's a fault on the latest USB HID Drivers that requires an updated Flowcode definition please?

The USBHID (Macro), specifically the SendDataDirect setting continues to do what it says irrespective of any following code.

It seems to get locked in a loop somehow. So a keypad press does indeed transmit the variable's scancode (yes it's still that keyboard thing!) correctly but on a Flowchart where I sequentially do:

1. Send the variable's scancode with the SendDataDirect setting using the USBHID Macro - that's fine.
2. Light an LED.
3. Pause for 10 seconds.
4. Send a different variable's scancode with the SendDataDirect setting using the USBHID Macro - that's fine.

Except the SendDataSetting keeps repeatedly sending the variable in a constant loop forever despite the 10 second delay whereas it used to send in once previously.

It keeps sending until point 4 where it reads and sends the next scan code.

Is there a fault in this routine does anyone know or what am I doing wrong please?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Does anybody know if...

Post by Benj »

Hello,

HID works by transmitting the current data packet at a specified rate. If you are transferring a value for a keypress into the data packet then that value will continue to be sent again and again until you load in a new value.

To get over this you have to transfer the keypress value to the transmit function and then send an array of 0's to clear the keypress for the next transmission.

Post Reply