Might have been an external reset of the printer we didn't otherwise
detect, and unless we reset the line numbers we'll now be off and run
into resend requests.
Solves #1676
* UserSettings: crashed if overwrite an existing key with primitive value by same key with complex value. Also reduced number of calls to user.get_setting()
* Updated tests
(cherry picked from commit b75b53d)
On reload of the user settings a new user object was created but not
updated on the associated session user(s). That let to session user
(s) still referring to the old user instances with the only partially
updated user settings.
Behaviour changed such that on a reload of the users from file
(including user settings) all registered session users will now get
their reference updated as well.
Also made modelling of user id to session id a bit less redundant.
Former implementation tested for z-hop rising flank and anything that
is falling. That however causes issues with z-hop directly followed
by layer change (diff is not z-hop size but negative, image hence not
captured).
Instead of testing for positive flank == z-hop and any negative flank,
we now test for absolute value == z-hop.
Solves #1777
Cache was not invalidated on change of:
* snapshot URL presence
* system menu entry presence
* gcode viewer enabled/disabled
* changes in access control availability
Refactored cache setup to add enable_timelapse, enable_gcodeviewer
and enable_accesscontrol to ETag calculation, removed system menu
check. Template filtering will now be done based on the values of
these flags at render time, not before.
See also #1776 for a related ticket.
* Use only icons for settings and system entries
* Limit length of login entry to 100px
* Limit length of instance name to 250px
* Removed "OctoPrint" text if instance name is set
See discussion in #1741
* leading and trailing null bytes will now be stripped
* while connecting, a "wait" will also trigger switch to connected
state - relevant when connecting without reset and initial "ok" for
M110 gets mangled
* extended virtual printer by new options to test the above:
* mangled "ok" can now be injected via "preparedOks" setting and
prepare_ok DEBUG command
* simulated reset lines on beginning ("start" etc) now only sent
if new setting "simulateReset" is true
Should fix#1770