Commit Graph

79 Commits

Author SHA1 Message Date
Nico Tonnhofer bcb6964ceb heater: add max_pwm and software pwm also for stm32 2017-03-21 17:36:14 +01:00
Nico Tonnhofer fbe1af4013 configtool: add FORCE_SOFTWARE_PWM to configtool 2017-03-21 15:04:26 +01:00
Nico Tonnhofer 4882d19215 heater: if pwm is set to 1, hardware pwm is forced, if available. 2017-03-21 15:04:26 +01:00
Nico Tonnhofer 4abc3aa2f0 heater: software pwm with delta sigma algorithm
@triffid points me to the delta sigma algorithm. This is pretty nice
for slow updating routines. Others than normal PWM, this scale better
for slow frequencies.

This algorithm is a mix of
https://www.mikrocontroller.net/topic/293454#3128867
and
https://github.com/Smoothieware/Smoothieware/blob/29e80/src/libs/Pwm.cpp#L55
2017-03-21 14:51:08 +01:00
Nico Tonnhofer fb83d2de57 heaters: rework max heater value
remove the define USE_MAX_HEATER
this will cost only neglabile space when not enabled on AVR.
2017-03-21 14:51:01 +01:00
Phil Hord ab2c355821 Factor out some boilerplate code from configs
Configs are always included via a config_wrapper.h now, and configs always
must include this safety-definition for a missing DEFINE_HEATER.  Let's
simplify the configs by moving it to a common location.
2017-03-21 14:48:19 +01:00
Nico Tonnhofer f8c78e6384 heaters: add max heater value
You can reduce the max. power of each heater.
With the max_pwm value between 1 and 100% you reduce the active pwm.
For example you could reduce the power of your hotend.

My hotend for example is 12V 30W but connected to 24V. So it has
normally 120W. This is very huge. Setting the max_pwm to 25, it has
again ~30W.
2017-03-21 14:48:15 +01:00
Nico Tonnhofer 3e76406b8c STM32F411: add CNC Shield V3 for Nucleo Pinout 2017-03-03 18:54:56 +01:00
Matt Gilbert a691f2a8ab PCBScriber config files.
PCBScriber is a printer for the scratch 'n etch method, see

  http://reprap.org/wiki/PCBScriber

Commit reviewer Traumflug's note:

 - Rebased to current branch 'experimental', which adds
   USE_INTERNAL_PULLDOWNS.

 - Removed DEFINE_HOMING for now, this part isn't cooked, yet.
   For example, it doesn't pass regression tests.

 - Thank you very much for the contribution!
2016-11-20 14:45:45 +01:00
Markus Hitter e9b2bf45cb Config files: update comment/help text for USE_INTERNAL_PULLUPS. 2016-09-30 13:51:01 +02:00
Markus Hitter e49de09f58 Config files: introduce USE_INTERNAL_PULLDOWN. 2016-09-30 13:48:46 +02:00
wurstnase 66f06d20a2 Temp: change TEMP_EWMA to integer.
This allows to use EWMA_ALPHA in an #if clause, which is needed
for the next commit.

Review changes by Traumflug: made changes to comments more
complete, added rounding ("+ 500") and also adjusted Configtool
for the change.
2016-06-25 14:30:59 +02:00
Markus Hitter 11e907de03 Configtool: also deal with PS_INVERT_ON.
This partially solves issue #165.
2016-06-11 13:10:09 +02:00
Markus Hitter 813bdf4452 Display: add regression test for 4-bit bus and HD44780 display.
(Ab)use the old Gen7 v1.3 configuration for this, as this is
rarely in use and because this board also happens to be the board
where the tested code was developed on.
2016-05-30 14:10:25 +02:00
Markus Hitter b9fe0a5dd0 Configtool: learn about 4-bit bus pins. 2016-05-30 13:41:13 +02:00
Markus Hitter 0947c5ba50 Configtool: learn about DISPLAY_TYPE_HD44780.
This replaces DISPLAY_TYPE_LCD1302, because LCD1302 has no
actual implementation, yet.
2016-05-30 11:05:50 +02:00
Markus Hitter 6e4cd69345 board.ramps-1.3.h: add all four pins from the Servos connector.
Previously there were only two of them, the others missing for
no apparent reason. This should help connecting an external
relay, like described here:
http://www.reprap-diy.com/connect_sevenswitch_to_ramps
2016-05-25 20:29:54 +02:00
Markus Hitter bb56874088 Regressiontests: add a test for ATmega328, I2C, SSD1306. 2016-05-06 20:34:18 +02:00
Markus Hitter 4645715f18 Configtool: make KINEMATICS a set of booleans, too.
Reasons:

 - Less code, easier handling.

 - An entire case of configuration handling could be removed.

 - Better class-like encapsulation.
2016-04-20 22:02:07 +02:00
Markus Hitter 1fad0036a7 Configtool: replace DISPLAY_TYPE with a set of booleans, too.
Same reason, same procedure as the previous commit.
2016-04-20 22:00:47 +02:00
Markus Hitter 90969978df Configtool: replace DISPLAY_BUS parameter with a set of booleans.
Having a choice with a defined set of options is nice, but it
also requires these options to be #defined somewhere _before_
entering config.h. To keep class-like encapsulation, we'd need
two header files for each code unit, one for the options, another
one for the usual header.

That said, we use other examples of such options, e.g. CPU, F_CPU
or KINEMATICS. For CPU and F_CPU it works fine, because their
options are numbers or other values known by the compiler. For
KINEMATICS it kind of works, because this #define is used in only
one place ... and there it's suboptimal already, because no option-
set.

Anyways, I was unsure about this change and if it turns out to be
a poor decision later, it can be reverted.
2016-04-20 22:00:05 +02:00
Ruslan Popov 212eca7f8e Configtool: add display page implementation.
Most work by Ruslan Popov, collected from various commits and
made compatible with regression tests by Traumflug.

Display test code is now enabled by #defining DISPLAY_BUS to
i2c_twi.
2016-04-20 21:56:39 +02:00
Robert Konklewski ab55b86472 Add board config for the Tronxy/Cstar P802E. 2016-04-15 14:59:03 +02:00
Robert Konklewski 347fbcef5f Add printer config for the Tronxy. 2016-04-14 23:39:10 +02:00
Witold Sowa fdf6dbe849 Added support for MCP3008 and MCP3004 ADC for temperature read 2016-04-12 22:37:50 +02:00
Markus Hitter 67f0f6ef0e check_integrity.sh: move to a less user visible place.
No functional changes.
2016-04-12 00:11:43 +02:00
Markus Hitter 32f10e4f4b check_integrity.sh: check only version controlled files.
Checking files customized by the user is out of scope of this
tool and sometimes even workflow hindering.
2016-04-12 00:11:32 +02:00
Markus Hitter 595dd017ea Fix config files which didn't pass the new regression test.
All the changes are pretty much dummies, no functional change
anywhere.
2016-03-28 01:34:07 +02:00
Markus Hitter f0604b5e9d Add test for config files integrity.
It happens all to often that a #define is added or removed here
or there, but some related files gets forgotten. Now at least
existence of all the #defines is cross-checked.
2016-03-28 01:29:38 +02:00
Markus Hitter 7faab99671 board.gen7-arm.h: adjust for the released Gen7-ARM.
Just a few pin changes and similar stuff, no code change.
2016-03-27 20:36:03 +02:00
Markus Hitter 82374b8e24 Rename Z_LATE_ENABLE to Z_AUTODISABLE and refine description.
Also turn it on by default for the Mendel printer.

Also add the forgotten Mendel90 printer.
2016-03-27 20:23:05 +02:00
Wurstnase 57afef9fdd Add Z late enable.
Until this commit, the Z axis is disabled after each move and
only enabled when the Z axis will move. Now you can enable this
as a feature. Some printer axes are too heavy or have a high
pitch which are not self locking. In that case simply do nothing.
It's now off by default.
2016-03-27 20:14:04 +02:00
Markus Hitter 57cf28ad36 Add a board config for the SinapTec AT328-02.
See http://www.reprap.org/wiki/SinapTec
2016-02-28 15:57:54 +01:00
Markus Hitter 777967b3d5 Add configuration for a Mendel90 printer.
Derived from a contribution of Neil Darlow. Thank you, Neil!
2015-09-14 17:20:07 +02:00
Markus Hitter ba007f6265 Add configuration for a Melzi board.
Derived from a contribution of Neil Darlow. Thank you, Neil!

The adjustments done were reverting customisations like moving
direction reversals (which depend on motor wiring) or custom
thermistor beta values. Everything else left as-is.
2015-09-14 15:51:02 +02:00
Markus Hitter be6ca4c857 ARM, AVR: support inverted heater pin signals.
Implemented and tested for both platforms. This is quite a big
commit. Unlike with the previous changes to now choosable PWM
frequencies, all board configuration files and Configtool had
to be changed immediately to deal with the additional parameter
in DEFINE_HEATER() and keep AVR builds working (and regression
tests passing).
2015-08-13 17:12:10 +02:00
Markus Hitter 10310e9d19 heater-arm.c: respect configured PWM frequencies.
Especially at high frequencies the achieved one is only close,
but that's entirely sufficient for our purposes.

Test: the PWM frequency on the scope should be similar to the
one configures in the board file with DEFINE_HEATER().
2015-08-13 16:41:33 +02:00
Markus Hitter d7b59e2d33 ARM: implement heater-arm.c partially.
Currently at a fixed frequency of 1 kHz and with a fixed duty
cycle of 10%, but PWM does work.

As it turns out, PIO0_11 is not usable for PWM, because its timer
is already in use for the Step timer, and had to be disabled for
Gen7-ARM.

Test: define a heater in board.gen7-arm.h and a square signal
of 1 kHz with 10% duty cycle should appear on the heater pin.
2015-08-13 16:41:33 +02:00
Markus Hitter 05c7cf067f ARM: get dda_lookahead.c in.
Not much to say, simply works.
2015-08-12 14:26:37 +02:00
Markus Hitter 5a8dcf8e97 ARM: add a board configuration for Gen7-ARM.
Wohoo, this is the first ARM board in Configtool. Let's see how
Configtool deals with it :-)
2015-08-12 14:26:36 +02:00
Markus Hitter 42b96e0e27 SD card: commit SD_CARD_SELECT_PIN to all the board files.
For the bigger boards like RAMPS or Rumba the pin numbers were
taken from Marlin. For the smaller boards, the pin is commented
out.
2015-07-30 15:31:57 +02:00
Phil Hord 15e8dec9b2 board.gen3.h: restore {TX,RX}_ENABLE_PIN defs.
These were dropped accidentally, I assume, during the Configtool
template conversion. Without them the INTERCOM feature does not
compile and so board.gen3.h is broken.

Add the gen3 config to testcases and regressiontests to ensure
this does not drop again.
2015-07-29 21:05:38 +02:00
Markus Hitter 7212f3a23f board.nanoheart-v1.0.h: add a lost comment line. 2015-07-25 11:57:36 +02:00
Markus Hitter f09be1acbe Add configuration board.cnc-shield-v3.h.
Contribution by user madmike8 in the RepRap forum:
http://forums.reprap.org/read.php?147,33082,537026#msg-537026
2015-07-25 11:51:29 +02:00
Markus Hitter cd1eb4e250 Configtool: move board/printer.metadata to configtool/ ...
and rename it to board/printer.generic.h.
2015-07-17 13:38:22 +02:00
Markus Hitter 6b866e8c85 Configtool: get values back into config/*.metadata.
This has to work, else we can't provide default values for new
items.

Now loading a RAMPS board and just saving it results in an
identical file. Very well. Not so for other boards, because
disabled values still get lost.
2015-07-17 13:36:56 +02:00
jbernardis fb922735fd Configtool: process a metadata file before reading header files.
This should allow for easier addition of defines as Teacup evolves.
2015-07-17 13:36:48 +02:00
Ruslan Popov a13e00893d Add support for the NanoHeart board.
See http://blog.securelayer.ru/doku.php/reprap/electronics/nanoheart
2015-07-01 11:39:36 +02:00
Markus Hitter c4582e605a Refine help text for soft axis limits. 2015-06-06 20:09:06 +02:00
jbernardis 40c23e7970 Configtool: restore alignment of thermistor values in board file.
This should solve issue #154.
2015-05-31 12:53:57 +02:00