Direct readers to the main Installation file to setup the python
virtual environment and remove the outdated instructions in the
Debugging file.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename sched_timer_kick() to sched_timer_dispatch() and move its loop
into its callers in the board code. This eliminates the need to
export timer_try_set_next() from the board code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some additional tweeks to the scheduler has resulted in minor
improvements to the stepper benchmarks.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce a TICKS() macro during config parsing that will translate
time in seconds to time in clock ticks.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the logic to calculate and report the stepper's current position
from endstop.c to stepper.c. This localizes the stepper code into
stepper.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add initial support for micro-controller resets via the Arduino reset
mechanism. Also, automatically attempt a firmware restart if the
printer CRC does not match.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow sendf() to be called from irq and timer context - check for the
case where sendf() is called while already in sendf() and simply
discard those messages. This makes it safe to use output() debugging
calls even in irq and timer context.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change the default compression error window (max_error) from 50us to
25us - it's common for stepper motor drivers to have 30us for their
"pwm fixed off time" and it would be good for the steps to be
scheduled within that time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a DECL_CONSTANT macro to allow the firmware to define constants
that are to be exported to the host during the "identify" phase. This
replaces the existing hardcoded mechanism of scanning the Kconfig
header file for certain constants.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use a more real-world example to improve the description of message
block contents. Make it more clear that the data dictionary contains
and utilizes the full command descriptions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Various installation updates. Recommend upgrade to OctoPrint v1.3.0.
Recommend configuring OctoPrint to not disconnect on error. Note
quirk with needing to reload page if "/tmp/printer" not in list of
serial connections. Add brief documentation on use of extended
commands and checking for errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support human readable commands (eg, "help"). Add a "help" command to
list these extended commands.
Also, add support for declaring command aliases, command help, and
command availability next to the handlers themselves.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Check that all options specified in the config file are valid. This
catches possible typos and spelling errors in variable names that have
a default.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of writing error messages to stderr, route them into the
python code and use the standard python logging system.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for greenlets - a mechanism for tasks that can pause while
still allowing regular reactor events to occur.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Should a homing move complete without hitting the endstop, then
disable motors, disable the endstop checking, and report the error to
the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Writing to the debug log can cause an unbounded delay due to disk IO.
This is particularly so on embedded machines such as the Raspberry Pi
that run on SD cards. These log writing delays can cause problems for
the main processing threads.
The new "queuelogger" code forwards all the main thread log messages
to a queue, and a background thread writes the log messages from the
queue to the destination file. This eliminates the IO delay from the
main threads.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>