-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
monome ops need added focus functionality #169
Comments
this will be a general guideline for focus management on monome ops |
this now applies to op_step as well. |
sorry, just saw that you're talking about LIFE, my bad. for step / life, can't you just test the focus in the input function? ok, i added a function to bees/src/net_monome.c called net_monome_grid_clear() , and it is called from grid and step when focus set to 0. so that seems fine so far. commit efa5ae4 |
hm, it's actually not sufficient cause e.g. step then has to redraw its state when it gets focus back again. pretty clear though, will leave it to you to add a static 'refresh all' func to that operator..? |
op_grid works correctly because it doesn't send LED data when not focussed basic grid op rules:
that's it. On Thu, Mar 27, 2014 at 10:48 PM, ezra buchla notifications@github.comwrote:
|
So having thought about this a bit I think the best way to handle the focus-switching is for 'focus' inputs on these monolithic grid ops to be stateless. By that I mean they always display 0 on BEES inputs page.
A possible optimisation (which adds some complexity) would be to also have the backend driver notify an op when it loses focus. That way it can simply not send the LED data to backend driver... But I have a feeling this may not make a huge difference to performance. Pretty sure that plan will work, and work well, though carrying out the plan probably more challenging than maybe I'd like! @tehn, @catfact either of you see any pitfalls to this method of swapping grid focus between apps? |
that seems ok. it has drawbacks:
agreed, that's necessary, one way or another, for focus switching to work well. it can't work now.
this i'm a bit unsure on. i'm coming around to what i think @scanner-darkly was proposing on the forum, which is that the driver needn't keep its own state at all (except as a fallback); instead it points at the buffer of whatever op has focus. otherwise, seems like the options are:
but i'm still not really seeing the benefit of copying since the driver presumably needs to know about the focused op address anyway. |
Yes I thought harder about this and come round to your point of view on this. Additionally:
Sounds like the right thing to me - gonna make the necessary changes to driver on dev branch... (i.e putting the avr32lib merge to one side for a minute) will pull-request this change back into avr32lib along with my serial comms changes on dev at a later stage. |
The text was updated successfully, but these errors were encountered: