Emit a single event where the first argument contains
a "JobEvent" enumeration that describes the particular
event. This reduces the number of callbacks registered
by JobState consumers and allows them react to multiple
state changes in the same callback.
The individual events remain for compatibility, however
they are deprecated. Current modules should be updated
to use the "job_state:state_changed" event and new modules
must use this event.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
These flags replace strings as constants used to register and
identify Request Types (ie: GET, POST) and API Transport
Types.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Some installations do not have Klipper's configuration
in the data path's "config" folder. Provide a way to
opt out of this check.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use EAFP techniques to test for directory read permission
during registration. If access fails continue with registration.
This allows users to potentially fix an issue without restarting.
Inotify failures always require a restart to resolve.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Introduce placeholders for the regex capture groups.
This reduces the length of the original pattern and
makes it easy to change the pattern for a return value
if necessary.
This change modifies the float pattern to accept any
float or integer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Correction of the regex (Replacing the = with one: and adding the filament index for the regex to work).
Signed-off-by: Emmanuel WALDNER emmanuel.waldner@gmail.com
Create a websocket endpoint that allows clients identified as
agents to register remote methods with Klipper.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the Klipper installation is not updatable (ie not a git repo)
abort reinstantion of the deployer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use a lock to guarantee thread safety when parsing data. If
parsing results an error, save the error and raise it.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use the low level os.open() method to open the vcio device. This
resolves "unknown ioctl" spamming of the kernel log.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Improve the efficiency of "vcgencmd get_throttled" by directly requesting
the status from the user space driver using ioctl. This should reduce CPU
spikes that result from forking the current process.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Require that inline comments be separated from configuration
data by whitespace. Unescape comment specifiers that follow
the correct escape sequence.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the user creates or moves a folder that was is reserved
reserved correctly ignore or remove watches as appropriate.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Expose the UID assigned to webcams and allow clients to fetch, modify,
and delete items based on the UID. New additions must not specify a
UID.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>