Commit Graph

1502 Commits

Author SHA1 Message Date
Kevin O'Connor 88f4c38dca command: Refactor the command reading task
Refactor the code so that message block framing, command parsing, and
command dispatch are distinct.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-29 13:33:58 -04:00
Kevin O'Connor b7b368a1ed build: Default to python2 in the Makefile
Set PYTHON=python2 instead of python as some systems point python to
python3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-28 10:52:05 -04:00
Kevin O'Connor d2fafbdd9e build: Request python2 for all directly executed python binaries
Some systems point python to python3 instead of python2 - explicitly
request python2 to avoid conflicts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-27 20:26:02 -04:00
Kevin O'Connor d981973096 heater: Fix auto-tune code
Make sure the heater.target_temp is set during the auto-tune test so
that the heater.set_pwm() command will allow the heater to be turned
on.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-22 12:09:55 -04:00
Kevin O'Connor b310501970 sam3x8e: Use readl/writel instead of readb/writeb() in serial.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-22 10:51:49 -04:00
Kevin O'Connor e92ce565dd console: Support new artificial DELAY command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-22 10:51:49 -04:00
Kevin O'Connor da4f2c5ea0 checkstack: Continue to accumulate stack usage on misc instructions
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-22 10:51:49 -04:00
Kevin O'Connor bd48c3a083 pru: Remove unnecessary barrier() calls
The writel() call already implements a barrier() internally.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-16 14:26:37 -04:00
Kevin O'Connor ba58e0446d install-octopi: Add python-virtualdev to package list
Add python-virtualdev to the list of system packages to be installed -
it's usually already installed, but it doesn't hurt to add it to the
list in case it isn't already installed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-15 10:41:21 -04:00
Kevin O'Connor c03b4921c3 klippy: Make sure to always sleep before retrying next stats() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-15 09:37:57 -04:00
Kevin O'Connor c60e4aceed stepper: Increase the step delay time from 1us to 2us
Increase the step delay time so that it works with the common DRV8825
stepper drivers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-13 11:53:10 -04:00
Kevin O'Connor 156de2e4c2 delta: Fix support for different endstop_position settings on each stepper
The endstop_position is intended to support different values for each
stepper so that the individual tower heights can be configured.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-11 12:48:51 -04:00
Kevin O'Connor 959509496a gcode: Fix regression causing lost asynchronous commands
Commit d0932009 introduced an error that could cause lost input in
cases where the sender did not wait for an "ok" message before sending
the next command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-11 12:42:11 -04:00
Kevin O'Connor 8419e152bb klippy: Remove some obscure python2 dependencies
Don't modify dictionaries while iterating them and be careful to use
// when doing an integer divide.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-10 00:12:14 -04:00
Kevin O'Connor 1bc3e0a678 klippy: Use newer "except XYZError as e" python syntax
Use the newer syntax for python exceptions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-10 00:08:06 -04:00
Kevin O'Connor d093200966 gcode: Support running arbitrary gcode on extruder change
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:55:33 -04:00
Kevin O'Connor 72dc21fb1a gcode: Support for querying and setting multiple extruder heaters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:55:30 -04:00
Kevin O'Connor 24b8f4ebc1 extruder: Add initial support for multi-extruders
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:54:38 -04:00
Kevin O'Connor 136dccbcdf klippy: Allow each module to define their config sections
Create add_printer_objects() functions in the fan, heater, extruder,
and toolhead modules.  Create the necessary printer component objects
from this call instead of placing the code directly in klippy.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:54:34 -04:00
Kevin O'Connor d0e6a0928b pins: Fix typo in at90usb1286 support so PF0-7 pins are defined
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:46:07 -04:00
Kevin O'Connor 46846d4297 avr: Enable CLEAR_PRESCALER by default on at90usb1286
It appears this option is commonly needed on the at90usb1286 avr chip
(the printrboard requires it), so default it on.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-09 18:42:40 -04:00
Kevin O'Connor 01ee9e16c5 klippy: Prefer python dictionary comprehension to dict() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-06 12:35:13 -04:00
Kevin O'Connor 38411fd2e7 delta: Add support for specifying the angle each tower is at
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-05 18:05:45 -04:00
Kevin O'Connor b8094de129 avr: Support using serial instead of usb on AT90USB1286
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-06-05 12:30:49 -04:00
Kevin O'Connor 73207a12ba avr: Allow atmega328 to select a cpu speed of 20Mhz
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-29 14:24:18 -04:00
Kevin O'Connor 3af87e1c42 avr: Add SIMULAVR build option; don't show WATCHDOG or SERIAL_BAUD_U2X
Add a CONFIG_SIMULAVR option to the Kbuild menus and don't directly
prompt users for CONFIG_WATCHDOG or CONFIG_SERIAL_BAUD_U2X.  The only
reason to disable these options would be if one were running on
simulavr.  This simplifies the user visible menu options.

Also, only show CONFIG_CLEAR_PRESCALER for at90usb1286 chips.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-28 11:04:59 -04:00
Kevin O'Connor d2547ce6b0 avr: Add support for atmega328 chip
The atmega328 is basically the same as the atmega168 - it just adds
some additional memory.  Allow the chip to be selected during the
build.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-28 10:45:32 -04:00
Kevin O'Connor 7e3d7e071f avr: Reorder Kconfig entries so that atmega2560 at 16mhz is default
Reorder the MCU list so that newer chips are at the top of the list.
This causes the very popular atmega2560 to be the default chip
selected.

Reorder the frequency list so that higher frequencies are at the top
of the list.  Restrict the 20Mhz frequency to only chips that support
that speed.  This causes the popular 16Mhz frequency to be the default
speed on AVR.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-28 09:59:51 -04:00
Kevin O'Connor d4bed025ed command: Store the command parsing information directly in array
Instead of defining an array of pointers, just define the array
directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-26 13:25:51 -04:00
Kevin O'Connor a82e949c00 build: Use compile_time_request system for init, tasks, and shutdown
Avoid using linker magic to define the init, task, and shutdown
functions.  Instead, use the compile_time_request system.  This
simplifies the build and produces more efficient code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-26 12:39:34 -04:00
Kevin O'Connor ca9756413f sched: Allow shutdown_reason to be uint8
Store the shutdown_reason code in an 8-bit integer - this produces
better code on AVR.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-26 12:32:05 -04:00
Kevin O'Connor b9940f0e0d build: Avoid linker magic in compile_time_request.c unique id generation
Avoid generating unique ids via memory locations and linker scripts.
Instead, generate them using code produced by buildcommands.py.
Utilize gcc's ability to perform static string comparisons at compile
time to produce a unique id for each unique string.

This fixes a build failure on ARM introduced in 142b92b8.  It also
reduces the complexity of the build.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-26 12:32:02 -04:00
Kevin O'Connor f91a49c65d docs: Note how to handle odd corner in Pressure_Advance.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-25 13:39:16 -04:00
Kevin O'Connor 4b8ad3fc03 docs: Add a prerequisites section to Pressure_advance.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-22 12:32:20 -04:00
Kevin O'Connor e8aabbb40b docs: Add Todo item for supporting custom fan and pin config sections
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-22 11:55:41 -04:00
Kevin O'Connor 02a5fa2c79 config: Make it clear the "fan" section represents the print cooling fan
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-21 11:52:02 -04:00
Kevin O'Connor 944c121a00 config: Add periods to end of sentences in example configs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-21 11:51:58 -04:00
Kevin O'Connor c9b6662138 pru: Add support for ADC input
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-17 19:46:12 -04:00
Kevin O'Connor b85755c0ff pru: Move communication code to second PRU
Perform input and output in the second PRU so that more space is
available in the primary PRU.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-17 10:46:38 -04:00
Kevin O'Connor b6f24e78ac pyhelper: Fix GETHEX() macro used in dump_string() debugging
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-17 09:57:09 -04:00
Kevin O'Connor fc24aa041b pins: Add pin mappings for Beaglebone boards
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:15:52 -04:00
Kevin O'Connor c9b44b5bb6 serialhdl: Support working with pseudo serial devices
Support working with devices that aren't really serial ports and thus
do not have a baud rate.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:15:52 -04:00
Kevin O'Connor 2255176228 pru: Initial support for the Beaglebone PRU
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:15:52 -04:00
Kevin O'Connor ccaa25eaa5 pru: Add initial pru_rpmsg library code for Beaglebone PRU
Add external code for using RPMsg on the Beaglebone PRU.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:00:52 -04:00
Kevin O'Connor 969ee4c8f9 irq: Add an irq_poll() stub for board code
Allow the board specific code to run checks prior to running each
task.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 15:00:45 -04:00
Kevin O'Connor c35278e217 build: Avoid using noinline in common code
It's not necessary to use noinline for parsef() and stop_steppers().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00
Kevin O'Connor 039d3f0523 stepper: It is not necessary to ensure gpio_out_write value is 0 or 1
The gpio_out_write() and gpio_out_setup() calls will check for zero
and non-zero, so it is not necessary to explicitly convert to 0/1 in
the stepper.c code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00
Kevin O'Connor d56f8407a5 debugcmds: Move debugging commands from basecmd.c to new file
Move the implementation of debug commands to their own file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00
Kevin O'Connor 142b92b883 command: Use "i" instead of "m" constraint in _DECL_REQUEST_ID
On some architectures, gcc will allocate a register for inline
assembler with an "m" constraint.  Use "i" to avoid that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00
Kevin O'Connor c292006421 gpiocmds: Change MAX_SOFT_PWM from 255 to 256
Change the range of values used for software PWM to avoid doing an
integer division in the main code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-15 14:02:59 -04:00