Commit Graph

4135 Commits

Author SHA1 Message Date
Desuuuu ac4efcdf1d
docs: Add UART bus documentation 2021-09-10 01:08:25 +02:00
Desuuuu 49753e37b8
bus: Add UART support 2021-09-10 01:08:25 +02:00
Desuuuu 2735aecb92
uartscmds: Add runtime UART configuration commands 2021-09-10 01:08:23 +02:00
Desuuuu ca15a0bf81
serial: Make serial runtime-configurable
Rework `generic/serial_irq` to handle multiple serial connections. Buffers
are now allocated dynamically during setup.

Rework board-specific serial implementations to handle multiple serial
connections and runtime configuration.

Move host-communication related code to separate files.

`sendf()` now returns a value indicating whether it succeeds or not.

Host-communication serial interrupts are given priority over other serial
interrupts.

For STM32: merge STM32F0 serial implementation with generic STM32 serial
implementation and use a separate, static implementation on STM32F031 to
limit footprint.
2021-09-10 01:08:20 +02:00
Desuuuu 85aac2c2e1
serialhdl: Fail early if message exceeds max size 2021-09-09 17:08:07 +02:00
Desuuuu 2cd1ef2dbf
atsam: Reserve USART interface when using SPI
Use bus specific reservation to prevent conflicts.
2021-09-09 17:08:06 +02:00
Desuuuu 4dfdef3d1b
samd_sercom: Reserve the sercom interface 2021-09-09 17:08:05 +02:00
Desuuuu b3c2433fec
bus: Allow reserving hardware interfaces with [name] syntax
The special name "_" is treated as the bus name.
2021-09-09 17:08:04 +02:00
Desuuuu c63d3681ef
mcu: Allow reserving hardware interfaces with [name] syntax 2021-09-09 17:08:03 +02:00
Desuuuu 1a3e743dd6
bus: Allow bus-specific pin reservations 2021-09-09 17:08:02 +02:00
Desuuuu 61753fb63b
pin_resolver: Add hardware interface reservation 2021-09-09 17:08:00 +02:00
Kevin O'Connor c84956befe heaters: Change default smooth_time from 2 seconds to 1 second
A larger smooth_time results in a slower reaction time for the PID.
This increased delay can cause temperature oscillations with high
power heaters.  Many boards produce good results without any
smoothing.  So, it seems a smooth_time of 1 second is a better
default.

Reported by @ReXT3D.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-03 18:11:05 -04:00
Pascal af3622544d
docs: Add referenced config example for PWM tools (#4537)
Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
2021-09-03 18:10:09 -04:00
Kevin O'Connor 8865f5799e lib: Update stm32f4 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:14:54 -04:00
Kevin O'Connor 72c07acc99 lib: Update stm32f2 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:10:09 -04:00
Kevin O'Connor 118f787d5c lib: Update stm32f1 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:06:33 -04:00
Kevin O'Connor 729ac52851 lib: Update stm32f0 to use upstream github source
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 18:06:33 -04:00
Kevin O'Connor 1feea0cfe8 docs: Fix typo in Measuring_Resonances.md
Reported by @fredrikbaberg.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 12:42:45 -04:00
github@matthewlloyd.net 830c80a88a tuning_tower: Add STEP_DELTA and STEP_HEIGHT parameters as alternate tuning tower syntax
Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
2021-09-02 12:05:31 -04:00
github@matthewlloyd.net 286cc1becc tuning_tower: Add SKIP parameter
Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
2021-09-02 12:05:31 -04:00
Kevin O'Connor d7b04aa18f delta: Make the 'arm_length' description more clear in save_state()
Reported by @conlank.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 11:46:33 -04:00
Stefan Dej 3a497d04ac
toolhead: change SET_VELOCITY_LIMIT respond (fixed) (#4620)
Returns only the current values if no new ones have been passed.

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-08-31 13:37:48 -04:00
Lasse Dalegaard caec91b149 stepper: detect duplicate endstops
When adding steppers to a `PrinterRail`, detect duplicated `endstop_pin`
settings and add them to the already-registered endstop.

Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
2021-08-31 13:23:04 -04:00
Kevin O'Connor 9014677cbd test: Add printer-elegoo-neptune2-v1.2-2021.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-31 13:12:15 -04:00
wsippel b9116e4a03
config: Elegoo Neptune 2 configuration (#4592)
Signed-off-by: Willie Sippel <wsippel@me.com>
2021-08-31 13:07:33 -04:00
Kevin O'Connor dcf8cb82a3 tmc: Fix typo in get_status()
Fix missing variable assignement introduced in commit 5fd1c985.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 14:17:42 -04:00
Kevin O'Connor f11acd8065 motan: Add support for dumping and analyzing adxl345 data
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:39 -04:00
Kevin O'Connor 0b4fbc78a8 adxl345: Allow multiple simultaneous clients
It is now possible to have multiple tools gathering adxl345 data at
the same time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:39 -04:00
Kevin O'Connor 404b64fd62 adxl345: Change default chip name from "default" to "adxl345"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:26:36 -04:00
Kevin O'Connor 22167f9510 adxl345: Compress each sample from 6 bytes to 5 bytes
Transmit data from mcu to host using 5 bytes per sample and up to 10
samples per message block.  This improves bandwidth efficiency.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor e34137582d adxl345: Implement timing via new adxl345_status messages
Query the adxl345 message counter every 100ms so that accurate timing
can be obtained during measurements.  This allows the adxl345 data to
be exported with timestamps while captures are running.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor dd95f80d9d adxl345: Support querying accelerometer data from webhooks interface
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor d87f7a77c3 adxl345: Add new start_internal_client() function and use in callers
Introduce a new start_internal_client() function and change all client
code to use that instead of manually calling start_measurements() and
finish_measurements().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor 8cfaed441d adxl345: Always initialize device on start_measurements() call
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:50 -04:00
Kevin O'Connor e03e0e9dac adxl345: Move g-code commands to new helper class
Separate out the G-Code command handlers to a new ADXLCommandHelper()
class.  This helps separate the sensing code from the user interface
code.

Deprecate the RATE parameter of the ACCELEROMETER_MEASURE command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:25:45 -04:00
Kevin O'Connor 6999ff6256 motion_report: Add helper tool for internal subscribers of data
Add support for internal clients to "subscribe" to data like external
clients.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 3f46609c1d usb_cdc: Increase USB transmit size
Increase the transmit buffer size to better support bulk transmission
of sensor data.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 15035ed226 motan: Add corexy forward kinematics analyzer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 5e968db355 motan: Add support for graphing arbitrary get_status fields
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:11 -04:00
Kevin O'Connor 1e4041a96b motan: Pass dataset parameters in parenthesis
Replace names like "trapq:toolhead:x" with "trapq(toolhead,x)".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:12:01 -04:00
Kevin O'Connor 5fd1c9853d tmc: Add support for a get_status() method
Export mcu_phase_offset and drv_status information.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-30 12:00:46 -04:00
Kevin O'Connor 950477849d mcu: Support multi-mcu homing
Support endstops and probes attached to a different micro-controller
than their associated steppers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-28 16:08:57 -04:00
Kevin O'Connor 2e131497ca homing: Fix error in retract move causing "must home axis" errors
It's possible for the original homing move of an axis to alter the
position of other axes.  Make sure those other axes are not requested
to move on a subsequent second home retract move, as that could cause
an error if those other axes have not been homed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-28 15:45:11 -04:00
Kevin O'Connor 8d4d16d51a manual_stepper: Add missing calc_position() wrapper call
Commit 3814a132 added code to homing.py to call calc_position() - add
that function to manual_stepper.py .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-26 12:23:12 -04:00
Kevin O'Connor 25e493ef75 docs: Note importance of slow extrude rate in Rotation_Distance.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-25 12:07:21 -04:00
Kevin O'Connor 84ac5b0146 configfile: Support config.getchoice() with integer keys
If the choice mapping uses integer keys then lookup the config option
using self.getint().  This simplifies the callers and improves the
encoding of the printer.configfile.settings export.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-25 10:36:45 -04:00
Kevin O'Connor 75183bfb86 Revert "toolhead: change SET_VELOCITY_LIMIT respond behavior"
This reverts commit 9f75e348b0.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-24 12:34:00 -04:00
stefand 9f75e348b0 toolhead: change SET_VELOCITY_LIMIT respond behavior
Returns only the current values if no new ones have been passed.

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-08-24 10:49:31 -04:00
Kevin O'Connor d759b4e532 motan_graph: Fix legend when using matplotlib twinx
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-24 10:19:23 -04:00
Kevin O'Connor 7aa2c11b3a data_logger: Flush the initial index file when all queries complete
This should avoid zero byte index files for small captures.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-24 10:19:12 -04:00