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>
Temperature Monitors may report null values as temperatures,
thus special handling is needed. This commit also reworks
temperature store updates to use the subscription cache
rather than perform its own caching of "last temps".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Now that all subscriptions are cached it is no longer required for
the paneldue component to cache its own printer state.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This callback will only fire after a component has requested
a subscription, preventing early updates while the component
is waiting for the subscription request to complete. It is still
valid for components to register the "server:status_update"
event handler if this behavior is not a concern.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is possible that a subscripition request can occur between
after Klipper updates a field's status, but before it pushes
a status update to the connection. The result is a race
condiiton where the response to the subscription request
contains the lastest state but it is not propagated to
currently connected clients.
This is resolved by caching subscripiton data, diffing it
with the response to the subscription request, and
manually pushing the diff.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Wrap a Future instead of an Event, as we don't need to notify multiple
waiters. Additionally the future can return responses and raise exceptions
directly.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The subscripition request is reentrant in Klippy. Sending multiple
requests from the same connection may create a race condition,
so use a lock to prevent reentry.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
A previous bug in the webcam module could have set boolean
values as integers. Make sure they are type correct when
reading webcams from the db.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
In Python a "bool" is a subclass of int. When introspecting
a webcam's attributes it is necessary to check for booleans
before integers.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use Moonraker's environment variables when generating the
env file for service validation updates.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow all command line arguments to be specificed as an
environment variable. If both the command line argument
and environment variable is present the command line argument
takes precedence.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows Moonraker to report anomalies detected in an updater
that won't prevent an update. Front ends may decide to present
these to users in a more subtle fashion so they know the state of
the repo without being concerned of an issue.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a command line option that allows the installation to specify
the exact path to Moonraker's unix domain server socket. The
default location remains at:
<data_path>/comms/moonraker.sock
Signed-off-by: Eric Callahan <arksine.code@gmail.com>