krisbuist / timeular-zei-linux

Linux client for the Timeular ZEI
MIT License
32 stars 11 forks source link

add stop on side 0 functionality #2

Closed hulkamania closed 6 years ago

hulkamania commented 6 years ago

Using the Zei API it appears to only be able to edit activities for sides 1 - 8 and IF other activities exist at least one of these will be set to side 0.

Thus currently placing the Zei in its stand activates whatever activity is set for side 0. For the officially supported applications this should stop the current activity. This change adds such functionality.

hulkamania commented 6 years ago

Rather than hard coding this it might be nice to be able to define the "pause" sides in the configuration. I will rework the commit.

krisbuist commented 6 years ago

Using the Zei API it appears to only be able to edit activities for sides 1 - 8 and IF other activities exist at least one of these will be set to side 0.

Is that actually true? The software/API is also suitable for registering and managing up to 20 sides of the Zei. See: http://support.timeular.com/first-steps/get-started-with-timeular-maker-kit

I'm fine with accepting your PR, since the convention of side 0 being the "noop" side seems reasonable to me. OTOH, I don't really see what issue this is fixing you're facing. Personally, my Zei already stops tracking when I turn it to side 0, because of the fact that no activity is registered to side 0 and the application is supposed to stop the current activity when the Zei is switched to a side which has no activity linked to it.

Is there a way you could inspect the loaded activities from the API and see if there might be somehow an activity linked to your side 0?

hulkamania commented 6 years ago

True that if the sides are set correctly this is not needed but if they are not for some reason it is easy enough to handle by specifying a pause side.

I have made it a command line flag so that it can be left out or even freely selected.