But if I used the following, would it not evaluate only at the start of the while loop? The main loop of the whole test lasts on the order of minutes even if all sub-tests pass, so how would that capture a <1sec button press? Or is Python an event-driven language, where a change in the evaluated condition will break the loop at any point?
while pruio_gpio_Value(io, abortPIN) Thanks, -- Don Pancoe, P.E. Industrial Designer, Electrical Engineer DonPancoe.com <http://donpancoe.com/> On Thu, Mar 4, 2021 at 6:35 AM TJF <[email protected]> wrote: > Why so complicated? > > Dennis Bieber schrieb am Donnerstag, 4. März 2021 um 05:03:54 UTC+1: > >> Your sleep() and loops would then include something like "while not >> abortFlag". >> > > Replace > > while not abortFlag > > by > > while pruio_gpio_Value(io, abortPIN) > > and drop all that IRQ magic (which only makes sense when you can use the > hardware debounce feature). > > And drop all that device tree magic. Instead configure the abortPIN by > libpruio as GPIO with pull-up resistor (PRUIO_GPIO_IN_1) and wire the other > end of the button to ground. > > Focus on your major target. Don't waste your time by reading and testing a > bunch of documentations, which are too modern (or outdated) for your > current system. > > Regards > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/a1ab4004-4871-46c2-8fd3-be8fcb160206n%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/a1ab4004-4871-46c2-8fd3-be8fcb160206n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAP3tSUPh_tSjC2BBbxHkPkGZ%3Dqb_j7M%3DJbKu1bR8arFDYNjW9A%40mail.gmail.com.
