Commit graph

427 commits

Author SHA1 Message Date
Scott Lahteine
0c9231fd04 Move 'module' files 2017-09-12 14:51:05 -05:00
Scott Lahteine
2af62a5d8d Apply spacing, const to some HAL code 2017-08-31 18:33:07 -05:00
kfazz
fa9ff6be6e try to fix LIN_ADVANCE for 32bit 2017-08-31 18:33:07 -05:00
Christopher Pepper
4b16fa3272 Implement HAL and apply macros across code-base
Implement AVR Platform
2017-08-31 18:14:31 -05:00
Scott Lahteine
e337df2e98 Miscellaneous tweaks to serial outputs, code cleanups 2017-08-23 18:32:58 -05:00
Scott Lahteine
b0173ccdb9 Drop extra initializers for vars initialized by EEPROM code 2017-07-20 22:57:49 -05:00
João Brázio
2065591daf Add support for BQ heated bed kit with Hephestos 2 2017-07-07 03:10:38 -05:00
Bob-the-Kuhn
9651d01e1a Add Skynet/ANET A10 support 2017-06-24 19:07:03 -05:00
Scott Lahteine
a9f8e518bf Fix FILAMENT_WIDTH_SENSOR infinite loop issue
Addressing #6992 and #5851
2017-06-23 14:53:01 -05:00
Scott Lahteine
6c45d0fd81 Apply maths macros and type changes ahead of HAL 2017-06-19 22:57:42 -05:00
Scott Lahteine
7769a22064 Tweaks to temperature code 2017-06-15 15:25:23 -05:00
Thomas Moore
e47029199e Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF (#7000)
* Remove ADVANCED_PAUSE_FEATURE requirement for PROBING_HEATERS_OFF

* Add HEATER_IDLE_HANDLER conditional
2017-06-12 00:22:31 -05:00
Scott Lahteine
dde8bb7c8b Fix extrude_min_temp compiler warning 2017-06-10 20:07:36 -05:00
Scott Lahteine
e94f79ccea Patch some serial macros 2017-06-09 17:17:23 -05:00
Scott Lahteine
b7dc4d9973 Save 92b PROGMEM, 14b SRAM with extruder auto fan 2017-06-07 16:07:38 -05:00
Scott Lahteine
efc198f952 Spacing, const, comments 2017-06-07 16:07:38 -05:00
Bob-the-Kuhn
c34d7a29a6 fix redefinition errors for redundant_temperature
Removing redundant_temperature from public section and leaving it in the
private section
2017-06-03 16:40:14 -05:00
Scott Lahteine
b0eae68f57 Prevent bed temperature being set too high 2017-05-28 11:11:17 -05:00
Thomas Moore
fb5e0ffe16 Unify M600 and M125 pause features (#6407)
* Unify M600 and M125 pause features
* Cleanup per thinkyhead's comments
* Rename filament_change_menu_response to advanced_pause_menu_response
* Include HAS_BED_PROBE in QUIET_PROBING
* Update gMax example file
* is_idle() is out of scope without the braces
* Convert FT-i3-2020 to Advance Pause names...
* Allow pause even if not printing
2017-05-26 13:01:02 -05:00
Scott Lahteine
34cfbc90cd Use new attribute macros in more places 2017-05-22 17:38:58 -05:00
Scott Lahteine
8a0a5cfccc Temp-related cosmetic changes 2017-05-21 04:49:25 -05:00
Scott Lahteine
b29dbbd5e4 Use uint16_t for temps 2017-05-21 04:48:53 -05:00
Scott Lahteine
11104f177b Apply const in BABYSTEPPING 2017-05-09 12:37:23 -05:00
Scott Lahteine
081bf1f879 Patch #else / #endif comments 2017-05-09 12:37:23 -05:00
Scott Lahteine
71396f77d3 Cleanups following recent commits 2017-05-08 14:23:01 -05:00
Scott Lahteine
a6dafb058e Small reduction in error code size 2017-05-08 13:58:09 -05:00
Scott Lahteine
a1e04942a2 Cleanup to software PWM variables 2017-05-08 13:51:45 -05:00
Brian
6cb0fa4128 Cleanup previous implementation of new quiet probing
Saves a few lines of code.
2017-05-08 08:13:46 -04:00
Brian
faa270071d Improve BLTOUCH_HEATERS_OFF functionality
- rename to PROBING_HEATERS_OFF
 - move heater pausing functionality into thermalManager
   - add variables, pause(), ispaused(), other functions
 - add fan pausing functionality -> PROBING_FANS_OFF
 - add probing_pause() wrapper
 - move pausing into do_homing_move() and do_probe_move() to minimize quiet time and so other probe types can benefit
 - example configs
2017-05-07 16:22:08 -04:00
Scott Lahteine
6854f08d22 Shut down autotemp in disable_all_heaters 2017-05-03 20:54:26 -05:00
Scott Lahteine
2658cc707a Treat temperature as integer, when possible 2017-05-03 17:27:25 -05:00
Scott Lahteine
096b927102 Minor optimization of FILAMENT_WIDTH_SENSOR 2017-04-26 06:24:23 -05:00
Scott Lahteine
5bdb0b567d Cosmetic patches 2017-04-26 06:24:23 -05:00
Scott Lahteine
ff0018e287 Format hex values as uppercase 2017-04-21 21:42:41 -05:00
benlye
0a2f60fab4 Make spi.h inclusion conditional
spi.h is only needed if HEATER_0_USES_MAX6675 is defined, so making its inclusion conditional on HEATER_0_USES_MAX6675 being defined.
2017-04-15 16:22:42 +01:00
Scott Lahteine
7f950a80c0 Make ADC sensor reading frequency adjustable 2017-04-09 22:18:21 -05:00
Paweł Stawicki
44cdebb8f1 Add software spi support for max6675 2017-04-09 06:44:53 -05:00
Scott Lahteine
832064e4f2 Implementation changes to support 5 extruders 2017-04-07 10:46:37 -05:00
Scott Lahteine
699310d1d2 Fix: Thermal runaway if nonexistent bed's temp is set 2017-04-02 11:48:10 -05:00
Scott Lahteine
25a6bfa7ed Add and apply WITHIN macro 2017-03-31 09:27:48 -05:00
Scott Lahteine
499f9e04e1 Marlin: Temperature soft-PWM cleanup 2017-03-29 06:37:27 -05:00
Scott Lahteine
043be2856b Use "& 0x3F" instead of "% 64" 2017-03-24 04:13:50 -05:00
Stefan Brüns
6a040a6967 SOFT_PWM: Do not switch off heaters twice on pwm_count wraparound
After wraparound, pwm_count <= pwm_mask holds, thus soft_pwm_X <= pwm_count
guarantees soft_pwm_X < pwm_mask is true, and the heater will be switched
off in the first branch.
Do not evaluate the pwm conditions a second time, this reduces the
instruction count (4 instructions per PWM) and text size (6 byte).

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:50 -05:00
Stefan Brüns
0a74774af1 soft_pwm: avoid useless refetches of pwm_count
The compiler is not able to reuse the value of pwm_count, but reloads it
on every evaluation, if is stored in a static variable, as it cannot prove
it will be unchanged. A variable with local scope may not be modified from
the outside, so its value can be reused.
Doing so reduces text size and instruction count.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:50 -05:00
Stefan Brüns
35a55d5757 SOFT_PWM: Implement dithering if SOFT_PWM_SCALE is 1 or more
If dithering is enabled, the remainder of the soft_pwm_X duty value at
turnoff time is added to the next cycle. If e.g. the duty is set to 9 and
SCALE is set to 2, the PWM will be active for 8 counts for 3 cycles and
12 counts on each fourth cycle, i.e. the average is 9 cycles.

This compensates the resolution loss at higher scales and allows running
fans with SOFT_PWM with significantly reduced noise.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:36 -05:00
Stefan Brüns
2aed66a955 temperature: Fix SOFT_PWM off by one
A 128 step PWM has 127 intervals (0/127 ... 127/127 duty). Currently, a
PWM setting of 1/127 is active for 2/128, i.e. double the expected time,
or, in general n+1/128 instead of n/127.
Fixes issue#6003.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
2017-03-24 04:13:36 -05:00
Scott Lahteine
6618346148 Patches to work around "register spill" compiler bug 2017-03-18 11:35:21 -05:00
Scott Lahteine
77491dd924 Remove extraneous whitespace 2017-03-18 03:17:39 -05:00
Scott Lahteine
2defb1d748 Use SET_INPUT_PULLUP where appropriate 2017-03-07 23:43:33 -06:00
Scott Lahteine
fea0d3f20f Endstop and temp-isr general cleanup 2017-03-06 02:07:07 -06:00