Commit graph

28 commits

Author SHA1 Message Date
GMagician
e9c72978c7 Implement SERVO_DELAY as array
This modify give SERVO_DELAY x servo basis
2017-08-15 00:28:47 -05:00
Scott Lahteine
941943c167 Apply const, spacing, etc. 2017-06-27 05:23:49 -05:00
Scott Lahteine
081bf1f879 Patch #else / #endif comments 2017-05-09 12:37:23 -05:00
Scott Lahteine
6131c62499 General cleanup 2017-04-20 16:04:29 -05:00
Scott Lahteine
e244399766 Additional cleanup of UBL code 2017-03-22 20:51:10 -05:00
AnHardt
fa26767efe Replace all remaining 'boolean' with 'bool' 2017-01-13 13:03:52 +01:00
Scott Lahteine
c6226bb0aa Unify config in a single include without nested includes 2016-07-25 23:04:19 -07:00
esenapaj
03b8f88092 Tab to Space 2016-07-02 08:07:33 +09:00
Scott Lahteine
03c70c1990 SERVO_DEACTIVATION_DELAY => SERVO_DELAY 2016-06-23 14:33:29 -07:00
Scott Lahteine
0da744b7b0 Further cleanup of comments, partial Doxygen-style
Following up on #3231
2016-03-25 00:45:56 -07:00
jbrazio
5e5d250832 Added gplv3 header to all Marlin files 2016-03-24 18:01:20 +00:00
Scott Lahteine
6e1bc03d3b Additional wrapping for #3140 2016-03-15 01:18:58 -07:00
Scott Lahteine
f9ded2a7c4 Wrap macros to prevent bad expansions 2016-03-12 22:38:55 -08:00
Scott Lahteine
ff13070b59 Use _BV macros, patch up others 2016-03-06 05:51:55 -08:00
Scott Lahteine
209f5f21e0 Use macros where possible
Apply `constrain`, `NOMORE`, `NOLESS` and `CRITICAL_SECTION` macros
wherever possible.
2016-03-06 05:51:55 -08:00
Scott Lahteine
0c7f7ebcfb Styling adjustments (PR#2668 & PR#2670)
Keep "astyled" reformatting
2015-10-03 22:02:45 -05:00
Scott Lahteine
46453905d6 Apply remaining ENABLED/DISABLED conditionals 2015-08-03 16:04:48 -05:00
Scott Lahteine
58cfcd4239 Overridable Options - Part 5
Apply `ENABLED` / `DISABLED` macros to files needing only a small
number of changes.
2015-07-31 01:24:20 -05:00
AnHardt
8b876241bd Some more servo code tweaks
Just set up the pin. Don't move to a random position.

Simplify servo::move()
* servo::move() does not need the pin parameter - The pin is set during servo_init() with attach().
* servo::move() does not need a return value.

SERVO_LEVELING is the wrong condition to deactivate the servos.

Remove some temporary (Servo *) variables.
SanityCheck for the servo indexes.
2015-07-24 22:04:49 -05:00
Scott Lahteine
96ace72ddc Servos attach/detach based only on servo config
Assuming #2470 fixed up the main issue.
2015-07-22 16:34:26 -05:00
Scott Lahteine
eacfe132aa Change the name of servos[] and servo_t 2015-07-19 11:35:48 -07:00
Scott Lahteine
3b23ccd366 Patch servos code for move
- Have `Servo::attach` explicitly return -1 if it fails
- Check for -1 in `Servo::move` because `servoIndex` might be 0
- Make `attach` / `detach` calls conditional on `SERVO_LEVELING`
- Move `SERVO_LEVELING` define to `Conditionals.h`
2015-07-19 11:24:23 -07:00
AnHardt
a6628f12cc Eliminate the further use of the pin-parameter 2015-07-15 20:50:58 -05:00
AnHardt
8504992e9f Remove the additional pin variable in Servo.cpp
as sugested by @c-born
inhttps://github.com/MarlinFirmware/Marlin/issues/1885#issuecomment-92618240
2015-07-15 20:50:58 -05:00
Scott Lahteine
391386dd94 Update configs for new servo deactivation 2015-07-15 19:13:40 -05:00
AnHardt
2ddb2a2be9 Add Servo::move() to servo.cpp
move(pin, angel) - Sequence of attach(pin), write(angel),
                   if DEACTIVATE_SERVOS_AFTER_MOVE is defined waits SERVO_DEACTIVATION_DELAY, than detaches.

As we have jitter on the servos during moves of the steppers, and detaching them improves this behaviour,
the usual sequence to handle a servo movement is:
attach(pin)
write(angel)
delay(until the servo finished the move)
detache()

Here a function to handle the complete sequence.
2015-07-15 17:39:43 -05:00
Scott Lahteine
42465ee444 Cleanup of comments & spacing 2015-06-28 08:20:28 -05:00
Ivan Galvez Junquera
59529b755d Fixed lowercase change missing on commit a22a228b.
Servo.cpp and Servo.h were changed to lowercase in Makefile but not their actual filenames.
2015-05-04 09:44:34 +02:00
Renamed from Marlin/Servo.cpp (Browse further)