HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

Add `clicked pad`, `clicked drop` to macro language. #220

Closed EvanKirshenbaum closed 5 months ago

EvanKirshenbaum commented 5 months ago

It would be very useful to be able to talk about clicked pad (or just clicked) and possibly clicked drop (as an alias of clicked pad'sdrop) to get the location of the last pad clicked on.

These could be done as MonitorVariables, in the same way that interactive reagent and interactive volume are treated.

Going further, we could ad something like identified pad, which waits for a click, doesn't process it on the front end, and returns the pad (or drop).

Migrated from internal repository. Originally created by @EvanKirshenbaum on Jan 17, 2023 at 2:51 PM PST. Closed on Jan 29, 2023 at 4:41 PM PST.
EvanKirshenbaum commented 5 months ago

This issue was referenced by the following commit before migration:

EvanKirshenbaum commented 5 months ago

'clicked pad' (or 'the clicked pad' or 'the last clicked pad' or 'last clicked pad' or simply 'clicked') return a MAYBE(PAD), which is missing if nothing's been clicked or the last thing clicked isn't a pad. clicked drop (the ..., the last ..., last ...) similarly returns the drop if the last thing clicked contains one.

Note that there is an asymmetry in that if the last thing clicked is a well gate, clicked pad can be None while clicked drop can be a drop.

While doing this, I also added a --[no]trace-clicks command-line argument to control whether the monitor prints a trace on every click. It defaults to False.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Jan 29, 2023 at 4:41 PM PST.