aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/serialqueue.c
Commit message (Collapse)AuthorAgeFilesLines
* reactor: Use the system monotonic clock instead of the normal system clockKevin O'Connor2017-02-061-3/+3
| | | | | | | | | | | | | The normal system clock can have sudden jumps if the system clock is changed. Use the system monotonic clock to avoid these sudden changes in time. It appears the Raspbian OS (which is used by OctoPi) is setup to update the system clock upon network connectivity. This could cause sudden system clock changes which could lead to Klippy processing errors. Using the monotonic clock eliminates these issues. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Remove serialqueue_flush_ready()Kevin O'Connor2016-12-301-14/+1
| | | | | | | | | The serialqueue_flush_ready() code was used to flush queue_step commands during a homing operation. It's no longer necessary now that moves during a homing operation use the normal message priority system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pyhelper: Add ability to route error messages to python loggingKevin O'Connor2016-11-301-2/+2
| | | | | | | 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>
* pyhelper: Move helper functions from serialqueue.c to new fileKevin O'Connor2016-11-301-59/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Be careful to free memory allocated in C codeKevin O'Connor2016-11-301-18/+46
| | | | | | Free steppersync, stepcompress, and commandqueue objects. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Fully deallocate serialqueue on disconnectKevin O'Connor2016-11-291-0/+34
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Kick the background thread from serialqueue_exitKevin O'Connor2016-11-291-9/+10
| | | | | | | Wake the background thread up when exiting - as this makes the exit complete faster (and have more predictable timing). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Fix possible memory leak in serialqueue_extract_old()Kevin O'Connor2016-11-291-2/+2
| | | | | | | Make sure to free all messages even if the requested size is smaller than the number of messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Calculate baudadjust from MCU's baud instead of host baudKevin O'Connor2016-07-161-2/+9
| | | | | | | Store the baud rate the MCU is configured for in the "identify" data and use that rate when calculating the baudadjust parameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Add debugging helper functions for dumping a binary bufferKevin O'Connor2016-06-051-0/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+1021
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>