Commit Graph

83 Commits (4183a249b6b3102add751f661a852543852569a1)

Author SHA1 Message Date
Christopher Pepper 4b16fa3272 Implement HAL and apply macros across code-base
Implement AVR Platform
dot-bob b3c36c98fd Edit digipot currents via LCD, save to EEPROM
Scott Lahteine 3c7bfe798d Various cleanups ahead of digipot save
Scott Lahteine e94f79ccea Patch some serial macros
Scott Lahteine ff0018e287 Format hex values as uppercase
Sebastianv650 84c685f8b5 First draft of Unified Stepper / E Advance ISR
esenapaj 069c6b38dd Remove unnecessary tabs and spaces
Scott Lahteine 98600e1433 Minor stepper cleanup
Scott Lahteine 00662b8635 Minor babystep cleanup patches
Sebastianv650 f9bea7968f BugFix for incorrect E-speed calculation
The extrusion speed was wrong due to a not high enough precision of
esteps to XY steps, therefore now the target float values are used to
calculate the ratio between XY movement and extrusion speed.
The e_speed_multiplier8 was replaced by an absolute multiplier called
abs_adv_steps_multiplier8, therefore one multiplication and bitshift can
be saved inside the stepper ISR. Due to this, also extruder_advance_k is
better suited inside the planner and not the stepper files any more.
Scott Lahteine f8199b2cc1 Merge pull request from thinkyhead/rc_abl_bugfix
Fix planner with kinematics, delta ABL
Scott Lahteine c5cac486f5 Use a, b, c instead of lx, ly, lz
Sebastianv650 a448cedbc5 LIN_ADVANCE bug fix and optimization
.) long to int: Extruder stalls at 10kHz / 20kHz step limits with long.
.) Take the delta_adv_steps calculation out of the step_loops loop. Wasted calculation performance if done inside.
.) >> 2 replaced by 3: Is divide by 8. Reason: Timer 0 runs at 16/8=2MHz, Timer 1 at 16/64=0.25MHz. ==> 2/0.25=8.
Scott Lahteine ecf7cdde65 Augment planner/stepper getters/setters
Scott Lahteine 5fff8d148b Clean up digital pots and microsteps
Scott Lahteine 7d72ed688c Revert motor_current_setting to `constexpr`
We should use `constexpr` wherever it makes sense, for its added benefits. See http://stackoverflow.com/questions/13346879/const-vs-constexpr-on-variables
Scott Lahteine 5efb12e889 Simpler report_current_position for SCARA
Scott Lahteine 5cbed13f41 'constexpr' => 'const' for PWM_MOTOR_CURRENT
esenapaj 954563d603 Adjust spacing
esenapaj 7e9576dc5b Extend the e_steps[] from int to long for allowing more than 32,767 E steps
Probably needed for long straight lines when using high microstepping
Scott Lahteine 8ff338c2b9 Patch stepper.h for SCARA
Scott Lahteine 9bf78ef465 Fix capitalization of counter_m
Scott Lahteine 08f717e5f7 Use bit-size typedefs for some stepper vars
Scott Lahteine 2f223b8c79 Use ABC and XYZ for "3"
Scott Lahteine b73203a0b7 Move some includes around to uncover missing deps
Scott Lahteine f8b5749235 Replace division in planner with multiplication
Scott Lahteine 05da02f0a2 Implement MIXING_EXTRUDER and SWITCHING_EXTRUDER
Scott Lahteine 117db77c55 make motor_current_setting static and constexpr
Scott Lahteine 8d8180e028 Parse M905 args in Marlin_main.cpp
Scott Lahteine aad9c0ed8d Apply updated ISR timing code
Scott Lahteine 6d62a4ffc8 Patch LIN_ADVANCE for style and forward-compatibility
Sebastianv650 fb8e880734 Add LIN_ADVANCE
Scott Lahteine 72c6f2923f axis_steps_per_unit => axis_steps_per_mm
Scott Lahteine e2a8961635 Use e_steps[EXTRUDERS] instead of e_steps[4]
Scott Lahteine 81384dfd36 Apply static to remaining stepper methods
Scott Lahteine 663d2463dc Merge pull request from thinkyhead/rc_statics_stepper
Apply static to Stepper class
Scott Lahteine 668d50f68e Keep Stepper encapsulation, use static data and methods
Scott Lahteine ecfdcf7250 Tiny calc_timer speedup
Scott Lahteine dc22097b3a Fix some of array initializations
- In `stepper.h` init `count_direction` array
- In `ultralcd.cpp` init `autotune_temp` array
Scott Lahteine 6398d497b3 Ultimate followup to Stepper/Planner patch
- Search all symbols and apply prefixes where needed
- Encapsulate some private methods
- Inline some setters
- Make `microstep_mode` a public method
esenapaj 605808fe37 Additional follow-up the PR #3631(Encapsulate S...
Additional follow-up the PR #3631(Encapsulate Stepper, Planner, Endstops in singleton classes)

・Change from abort_on_endstop_hit to stepper.abort_on_endstop_hit in endstop.cpp, Marlin_main.cpp, and ultralcd.cpp
・Add include path to cardreader.h and temperature.h in endstop.cpp(for CardReader class and disable_all_heaters())
It fix compilation error when ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED and SDSUPPORT are enabled.

・Change from digipot_current() to stepper.digipot_current() in Marlin_main.cpp
・Change from digitalPotWrite() to stepper.digitalPotWrite() in Marlin_main.cpp
It fix compilation errors when HAS_DIGIPOTSS is enabled.

・Change from microstep_mode() to stepper.microstep_mode() in Marlin_main.cpp
・Change attribute of microstep_mode() from private to public in stepper.h
・Change from microstep_readings() to stepper.microstep_readings() in Marlin_main.cpp
・Change from microstep_ms() to stepper.microstep_ms() in Marlin_main.
It fix compilation errors when HAS_MICROSTEPS is enabled.
Scott Lahteine 96f51f400f Planner singleton class
Scott Lahteine 5e4e535ce8 Stepper and Endstops as singleton objects
Scott Lahteine e087a99a10 Some cleanup of st_get_pos functions
Scott Lahteine 0da744b7b0 Further cleanup of comments, partial Doxygen-style
Following up on 
jbrazio 5e5d250832 Added gplv3 header to all Marlin files
Scott Lahteine af32a7d5d6 M120/M121 also set endstops non-homing state
Scott Lahteine 5d0570cea0 Make digitalPotWrite depend on HAS_DIGIPOTSS
Scott Lahteine 89838cdb10 Move step macros to stepper_indirection.h
Scott Lahteine 1002eb67c8 Update name of st_get_axis_position_mm in stepper.h