Commit graph

191 commits

Author SHA1 Message Date
Sam Lane a8fa275dc6 Fix Fan 0 responding to all fan speeds (#13444) 2019-03-23 23:00:31 -05:00
Scott Lahteine 49cf92dc36
Extended condition macros (#13419)
Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add:
- Alias `ANY(...)` for `!DISABLED(...)`
- Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...`
- Alias `EITHER(A,B)` for `ANY(...)`
- Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)`
- `NONE(...)` for `DISABLED(...)`
2019-03-16 23:43:06 -05:00
Ludy 59353546e8 Fix BUTTON_EXISTS and misplaced comma (#13411)
Fixes #13410 and redeclaration of `BUTTON_EXISTS`
2019-03-16 11:59:12 -05:00
Scott Lahteine 67bee06e43 No patch needed for non-libmaple analogWrite
See https://github.com/pinchies/Marlin/pull/1#issuecomment-471388743
2019-03-13 07:21:10 -05:00
Scott Lahteine f89b375fb9
Fixes and improvements for PWM pins (#13383) 2019-03-13 06:51:15 -05:00
Scott Lahteine 0375e92847 Followup to serial rework
As mentioned in #13370
2019-03-11 16:46:04 -05:00
Scott Lahteine 1f7e220387 Make HAL ISR macros function-like 2019-03-10 20:44:27 -05:00
Scott Lahteine 3419099f0a Clean up whitespace 2019-03-10 19:09:28 -05:00
MoellerDi c36989c39e Fix chamber temperature measurement (#13350) 2019-03-10 09:51:13 -05:00
Scott Lahteine 33a08fc6f7 Fix typos from temperature rework
Followup to #12201
2019-03-10 08:28:16 -05:00
Reece Kibble dbead66988 Allows user to set (almost) any PWM frequency (#12638) 2019-03-08 02:15:42 -06:00
3dlabsio 645ca7af7a M141 Heated Chamber, Temperature rework (#12201) 2019-03-07 02:09:39 -06:00
Scott Lahteine cfdb38eda4
Allow SERIAL_ECHOPAIR to take up to 12 pairs (#13311) 2019-03-05 06:46:19 -06:00
Scott Lahteine 2212da453a
Distinguish between analog/digital auto fans (#13298) 2019-03-05 00:41:31 -06:00
Chris Pepper 38bef9da91 Report auto temp to both serial ports, if available (#13301) 2019-03-03 21:03:48 -06:00
Scott Lahteine 599cdc3f0f Remove dead code from get_pid_output
See #12981
2019-03-03 05:45:20 -06:00
kAdonis 05c2f80826 Fix bug in wait-for-heatup (#13290) 2019-03-02 16:29:10 -06:00
Scott Lahteine 7fde3ed915 Skip hysteresis check when temp is already close to target
To eliminate a long delay during pause, park, and filament change
2019-02-28 14:35:19 -06:00
InsanityAutomation eb4bf93ea4 Add more Babystep options (#13262) 2019-02-27 04:38:56 -06:00
Scott Lahteine 64253e1a58 Followup to serial reform
Reference #13250
2019-02-25 00:20:36 -06:00
Scott Lahteine e15354e387
Simplify serial port redirect (#13234) 2019-02-23 22:53:01 -06:00
Scott Lahteine 0feeef2604 Update copyright in headers 2019-02-12 15:30:11 -06:00
Giuliano Zaro 773fa5c40f Fix define used when PID is off (#13119)
Replaced `PID_MAX` with `BANG_MAX` since it should be the correct define to be used when PID is not enabled.
2019-02-11 17:29:17 -06:00
LinFor 7ee35c2611 PID_MENU option to save PROGMEM in LCD menus (#13095) 2019-02-10 04:03:18 -06:00
AnHardt 0e37fe8776 Apply minimum C in M303 (#13113)
Apply minimum `C` in `M303`. `PID_autotune()` needs to be called with a 'C'ycles-parameter >2 to give meaningful (different from 0) PID-factors. Therefore silently raise C to 3. Fixing one aspect of #13104
2019-02-10 03:54:45 -06:00
Scott Lahteine 3c49396370
Fix compile error with DUE + MAX6675 (#13086) 2019-02-05 22:56:13 -06:00
Nicolas G 6fb4001b58 Add option to disable fan speed slowing in M303 (#13066) 2019-02-04 00:12:41 -06:00
Jiri 24fffb8d93 Fix undefined lcd_tmpfan_speed on NO_LCD_MENUS (#13006) 2019-01-24 16:34:40 -06:00
Ludy acf266fe78 Fix a compile warning, etc. (#12955) 2019-01-19 18:47:29 -06:00
Scott Lahteine 712e23c383 Fix up some whitespace 2019-01-17 18:05:36 -06:00
mikeshub 7fde8d9d1e Add CreatorPro / Makerbot / QIDI / etc and Mightboard RevE support (#12855)
- Fix a bug in MAXxxxx thermocouple temp reporting.
- Add support for 3-wire HD44780.
- Add support for PCA9533 RGB driver.
- Add configuration examples for FlashForge CreatorPro.
2019-01-14 14:29:55 -06:00
InsanityAutomation 082f6a27de ADAPTIVE_FAN_SLOWING extension to hotend thermal protection (#12853) 2019-01-12 00:41:48 -06:00
Scott Lahteine 459f4fef60 Fix Temperature::init bug with HEATER_4_PIN 2019-01-11 22:54:26 -06:00
Marcio Teixeira 60cb36bef3 Misc. improvements (#12747)
* Make ExtUI respect MAXTEMP limits
  - Temperatures are now clamped by MAXTEMP limits rather than arbitrary values.
* Speed up USB init, add status
  - Speed up USB initialization
  - Show status message if init failed
* Enable status messages for EXTENSIBLE_UI
* Adjust max limit to MAX_TEMP - 15
* Misc. tweaks to formatting, const, etc.
2019-01-01 15:17:48 -06:00
Scott Lahteine 9d59a9c840 Followup to #12691 (typo) 2018-12-20 16:38:32 -06:00
Roman Moravčík 4dad489a50 [2.0.x] Limit PID autotune target to maxtemp-15 (#12691) 2018-12-20 15:55:30 -06:00
Scott Lahteine c986239837
A single SERIAL_ECHO macro type (#12557) 2018-11-29 16:58:58 -06:00
Scott Lahteine 03ef2d6c82
Fix "paused" message and M125 called by M25 (#12551) 2018-11-28 19:28:31 -06:00
Scott Lahteine 09d6db491a Fix wait_for_bed compile error 2018-11-25 18:05:41 -06:00
Sinisa Culic 8a0992d921 Fast PWM for controller fan (#12485) 2018-11-23 16:03:39 -06:00
Ludy 1f93d2bcf7 Fix LCD compile error, etc. (#12472) 2018-11-18 20:39:49 -06:00
Marcio Teixeira c1e17037e5 Various fixes for MarlinUI and ExtUI (#12439) 2018-11-17 22:21:44 -06:00
Giuliano Zaro d3605cfc26 Don't start watching heaters when target is 0 (#12453) 2018-11-17 21:53:52 -06:00
Mateusz Krawczuk ca21ac6b9b Support two MAX6675 thermocouples (#8686) 2018-11-16 18:20:33 -06:00
Scott Lahteine d2bb53702a
Optimize target_extruder, ignore T with mixing (#12432)
* Optimize target_extruder, ignore T with mixing
* Give G-code Tn parity with tool_change
2018-11-14 17:33:04 -06:00
Scott Lahteine d82c350de7
Miscellaneous LCD code renaming, reordering (#12430)
* Move special characters to language.h
* Apply some naming standards
* Clean up menu item draw functions
* Rename some Temperature methods
* UI => ExtUI
2018-11-14 13:13:51 -06:00
Scott Lahteine a0c795b097
Encapsulate common display code in a singleton (#12395)
* Encapsulate common LCD code in a singleton
* Depend more UBL code on UBL_DEVEL_DEBUGGING
  - Since most users don't need the debugging on at all times, this helps reduce the default build size for UBL by over 2K, a little closer to fitting on 128K boards.
2018-11-11 12:16:24 -06:00
Scott Lahteine 6093df11dc
Allow G26 to use the active extruder (#12387)
* Make lcd_quick_feedback argument optional
* Add click_to_cancel option to wait_for_hotend/bed
* Have G26 use the active nozzle and wait_for_hotend/bed
* Use wait_for_release in UBL G29
* Add 'T' parameter to G26 for an initial tool-change
2018-11-10 18:07:38 -06:00
Ludy 5ba6607181 Fix keypad-related compile error (#12306) 2018-11-02 22:29:32 -05:00
Giuliano Zaro 323c088356 Restore LED light color after pid tuning (#12082) 2018-11-01 22:04:19 -05:00
Marcio Teixeira 71e19baf69 Fix kill => disable_all_heaters => print_job_timer.stop (#12146)
- Remove `print_job_timer.stop()` from `disable_all_heaters`
- Call `print_job_timer.stop()` for relevant `disable_all_heaters()`.
- Split up `kill()` for watchdog interrupt safety
2018-10-18 21:20:56 -05:00
Giuliano Zaro d43d4e4219 Refactor PRINTER_EVENT_LEDS, apply to M303 (#12038)
Co-Authored-By: Giuliano Zaro <gmagician@users.noreply.github.com>
2018-10-10 21:25:43 -05:00
Scott Lahteine d556dc1865
Fix and improve EEPROM storage (#12054)
* Clean up Temperature PID
* Improve EEPROM read/write/validate
* Group `SINGLENOZZLE` saved settings
* Group planner saved settings
* Group filament change saved settings
* Group skew saved settings
* Group `FWRETRACT` saved settings
2018-10-10 09:45:20 -05:00
InsanityAutomation 74cd6cb4fc Single nozzle filament change (#11994) 2018-10-07 17:06:14 -05:00
Scott Lahteine d6b0fbd771
Use uint8_t for all fan speeds (#12032) 2018-10-07 15:34:41 -05:00
Scott Lahteine 11ac75edcb
Use PGM_P for PSTR pointers (#11977) 2018-09-30 23:44:33 -05:00
Scott Lahteine d89d8fe852 Fix Busy State in temperature.cpp
Fix #11954
2018-09-29 17:03:35 -05:00
Scott Lahteine e4389f7d23
Standard methods to wait for heating (#11949) 2018-09-29 01:44:47 -05:00
Scott Lahteine 1718eff54a Code changes supporting up to 6 extruders 2018-09-16 22:32:53 -05:00
Scott Lahteine b220a825a7 Fix raw_filwidth_value error 2018-09-12 04:31:55 -05:00
AnHardt 530a13ab6c [2.0.x] SECURITYFIX missing max temp error when PID is used (#11717) 2018-09-05 01:41:45 -05:00
Dave Johnson c64199941e Compile only selected PIO environment (#11519) 2018-08-14 03:28:52 -05:00
Andy Shaw 624986d423 Ensure ADC conversion is complete before reading (#11336)
The current Marlin implementation relies on a timer interrupt to start the ADC conversion and read it. However in some circumstances the interrupt can be delayed resulting in insufficient time being available for the ADC conversion. This results in a bad reading and false temperature fluctuations. These changes make sure that the conversion is complete (by checking the ADC hardware via the HAL) before reading a value.

See: https://github.com/MarlinFirmware/Marlin/issues/11323
2018-07-26 03:59:19 -05:00
Scott Lahteine 22ebbc091f Tweak some SoftPWM code 2018-07-25 18:09:31 -05:00
etagle 1367df2875 Replace double with float, optimize calculation 2018-07-04 22:28:56 -05:00
Scott Lahteine 3fd1f32b73 Fix ADC key and chamber temp 2018-06-10 20:11:40 -05:00
Scott Lahteine 3701869e6c Add HAL_timer_start for AVR, use stepper timer to time pulses 2018-06-09 22:30:13 -05:00
Scott Lahteine 853a9056ac Long thermistor tables need special consideration 2018-05-28 06:28:34 -05:00
Scott Lahteine 1ce97f1f6d
Faster (bisect) search in thermistor tables (#10883) 2018-05-27 23:27:51 -05:00
Bob Kuhn d557c84a71 [2.0.x] Error for FAST_PWM_FAN with 32 bit CPU (#10798) 2018-05-20 11:37:55 -05:00
etagle 569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
2018-05-20 07:10:24 -05:00
etagle a11eb50a3e Refactor and optimize Stepper/Planner
Better encapsulation and considerably reduce stepper jitter
2018-05-20 06:23:58 -05:00
etagle 0566badcef Add memory barrier, optimal interrupt on-off
Disabling an ISR on ARM has 3 instructions of latency. A Memory barrier is REQUIRED to ensure proper and predictable disabling. Memory barriers are expensive, so avoid disabling if already disabled (See https://mcuoneclipse.com/2015/10/16/nvic-disabling-interrupts-on-arm-cortex-m-and-the-need-for-a-memory-barrier-instruction/)
2018-05-20 02:39:34 -05:00
Giuliano e1d9046efc [2.0.x] Temperature reading fix (#10774) 2018-05-19 15:39:36 -05:00
Scott Lahteine 99ecdf59af Smarter MIN, MAX, ABS macros
Use macros that explicitly avoid double-evaluation and can be used for any datatype, replacing `min`, `max`, `abs`, `fabs`, `labs`, and `FABS`.

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-13 04:52:56 -05:00
Scott Lahteine 083ec9963e Tweaks to heater / lcd conditions 2018-05-13 04:52:56 -05:00
Scott Lahteine 8f8c6a9bc4
Move get_axis_position_mm to Planner (#10718) 2018-05-12 09:59:11 -05:00
Scott Lahteine a1062eec5b
Better handling of DELAY_NS and DELAY_US (#10716)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-12 08:34:04 -05:00
Scott Lahteine f5aaa2d6c0 Fix some compiler warnings 2018-05-12 05:28:12 -05:00
Scott Lahteine 625035a9ce
Fix M301 access to lpq_len (#10714)
Co-Authored-By: Zwaubel
2018-05-12 02:13:40 -05:00
Scott Lahteine 325bbbc8c2
[2.0.x] Enable AD595 and AD8495 in concert (#10693)
* Allow both AD595 and AD8495 in concert
* General temperature code tweaks
2018-05-11 01:01:51 -05:00
Scott Lahteine 81b632c255 Additional temp-oriented improvements 2018-05-02 08:43:22 -05:00
nightdemonx e911635fb1 Add thermocouple with AD8495 support 2018-05-02 08:43:16 -05:00
Scott Lahteine 5ac226aa93 Further cleanup of inline delays 2018-04-27 19:22:22 -05:00
Chris Pepper 2242b98248 [LPC176x] Emergency Parser Feature (#10516) 2018-04-25 06:44:26 -05:00
Scott Lahteine 9789c1c719 Fix current_temperature_chamber compile error
Fix #10505
2018-04-24 07:55:58 -05:00
Eduardo José Tagle 0c428a66d9 Proper AVR preemptive interrupt handling (#10496)
Also simplify logic on all ARM-based interrupts. Now, it is REQUIRED to properly configure interrupt priority. USART should have highest priority, followed by Stepper, and then all others.
2018-04-23 22:05:07 -05:00
Scott Lahteine cb46cb8480
Add HAS_HEATED_BED conditional (#10495) 2018-04-23 17:13:01 -05:00
Lenbok 0e8242180d Chamber temperature monitoring and auto fan control.
This is an initial cut for feedback, updated for 2.0.x.

Chamber temperature is currently reported along with hot end and bed
temperatures to serial. The format is just like that used for hot end
and bed temperatures, but using 'C' prefix. As there is no heater,
target is always 0. Is this appropriate, is there a better way to report
chamber temperatures?

Chamber temperatures are not reported on the LCD in any way.

When auto chamber fan is enabled, it currently just uses the same
temperature threshold as the other auto controlled fans.

As the chamber temperature is not connected to any heater, it doesn't
undergo mintemp/maxtemp monitoring. This would need to change in the
future if chamber heating became a feature.
2018-04-06 23:09:06 -05:00
Scott Lahteine 1c36606886 Fix MSG_HEATING_FAILED_LCD_BED macro evaluation 2018-04-04 19:01:22 -05:00
Marcio Teixeira 8bc93c6f2b Improve heating/cooling LCD messages (#10293) 2018-04-04 18:29:27 -05:00
Karl Andersson 7cbbc2af7a [2.0.x] Optional heater signal inversion (#10260) 2018-04-02 19:37:41 -05:00
Eduardo José Tagle 97e8a6ebd9 Various fixes for DUE... (#10152)
- Watchdog reset during SD Card initialization.
- Move `DebugMonitor` to `DebugMonitor_Due.cpp`.
- Since the watchdog is enabled on boot do extra resets during init.
- Have `thermalManager` do watchdog reset before its ISR starts to prevent reset.
- Ensure that timers are stopped before reprogramming them to address tone issues.
- Improve SAM3XE reset when reflashed through the native port.
2018-03-21 19:04:45 -05:00
AnHardt 837ac2fdbd [2.0.x] Fix_Autotune_THERMAL_PROTECTION_BED_off (#10166)
- Fix Autotune Thermal Protection
- Make 2 constants in autotune configurable
2018-03-20 16:48:36 -05:00
Scott Lahteine c6ff39cc14 Spacing cleanup 2018-03-17 16:49:08 -05:00
Scott Lahteine ffbf63e6af Add HAS_TEMP_SENSOR conditional 2018-03-07 01:53:50 -06:00
Scott Lahteine 649f375494
Fix: M112 calling kill from interrupt (#9923)
Fix #9906
2018-03-03 23:14:01 -06:00
Scott Lahteine 83d7e95de0
Add MSG_THERMAL_RUNAWAY_BED (#9691) 2018-02-18 02:23:55 -06:00
Scott Lahteine e698998343 More reliable PROBING_HEATERS_OFF with BED_LIMIT_SWITCHING 2018-02-08 21:10:11 -06:00
Scott Lahteine b5e92f4f90
[2.0.x] Enable / disable PSU automatically (#9503) 2018-02-06 00:22:30 -06:00