HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
3 stars 1 forks source link

Patch for OpenDrop 4.1 #59

Closed EvanKirshenbaum closed 8 months ago

EvanKirshenbaum commented 8 months ago

OpenDrop 4.1 appears to have added two bytes at the beginning of their protocol to control magnets, which makes everything not work. I'm going to add a command-line flag (probably -4.1 vs. the default -4.0) to allow the user to specify that I should send extra (ignored) bytes.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Dec 06, 2021 at 11:15 AM PST. Closed on Dec 07, 2021 at 4:41 PM PST.
EvanKirshenbaum commented 8 months ago

This issue was referenced by the following commits before migration:

EvanKirshenbaum commented 8 months ago

Looking more closely at the OpenDrop firmware, version 4.0 expected one byte (non-one or one) for each of the 128 pads. Version 4.1 expects one bit for each pad (sixteen bytes, left to right per row and eight bits per byte, LSB to MSB down the column) followed by 16 bytes of control info (which we ignore, but which appears to only have two usable bits in byte zero for setting magnet state).

Our code used to have electrodes know their index into a byte array, setting the byte to zero or one on state change. Now, they know a byte and a bit index. (For version 4.0, the bit index is always zero.)

The wombat exerciser tool now takes a -4.1 flag (and a default -4.0 flag) to allow the user to specify which version they're using.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Dec 07, 2021 at 4:41 PM PST.