...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?
Does anybody know if...
Moderator: Benj
- 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...
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel