Commit Graph

76 Commits

Author SHA1 Message Date
Markus Hitter 92516b55ea run-in-simulavr.sh: enable size report.
Apparently this got forgotten earlier.
2016-11-21 19:56:19 +01:00
Markus Hitter 6e87ee5f96 Makefile-AVR: add a target for our standard performance test.
Our standard performance test is to run these three G-code files
in SimulAVR and recording step pulse timings. While this certainly
doesn't cover everything related to possible performance
measurements, it's a good basic standard to compare code changes.

Current performance:
  ATmega sizes               '168   '328(P)   '644(P)     '1280
  Program:  19808 bytes      139%       65%       32%       16%
     Data:   2191 bytes      214%      107%       54%       27%
   EEPROM:     32 bytes        4%        2%        2%        1%

  short-moves.gcode statistics:
  LED on occurences: 888.
  LED on time minimum: 308 clock cycles.
  LED on time maximum: 729 clock cycles.
  LED on time average: 317.393 clock cycles.

  smooth-curves.gcode statistics:
  LED on occurences: 23648.
  LED on time minimum: 308 clock cycles.
  LED on time maximum: 726 clock cycles.
  LED on time average: 354.825 clock cycles.

  triangle-odd.gcode statistics:
  LED on occurences: 1636.
  LED on time minimum: 308 clock cycles.
  LED on time maximum: 719 clock cycles.
  LED on time average: 336.327 clock cycles.
2016-11-21 19:54:59 +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
Markus Hitter 0555299717 Regressiontests: add test for ACCELERATION_TEMPORAL. 2016-07-09 13:53:57 +02:00
Markus Hitter 76efe06284 Regressiontests: add a test for ACCELERATION_REPRAP. 2016-07-09 13:48:56 +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 bcfb13d4e2 Regression tests: make sure we have a valid thermistor table.
So far it worked only if the user happened to have a table for
two thermistors. Having a table for only one thermistor made all
regression tests fail.
2016-06-07 20:15:10 +02:00
Markus Hitter d51edaf705 Regression tests: remove the script based integrity test.
Looks like it's obsolete now, superseeded by the one actually
running Configtool.
2016-06-06 14:18:08 +02:00
Markus Hitter fdf9534ed9 check_configtool.sh: comment on comment stripping. 2016-06-06 14:18:08 +02:00
Markus Hitter b3f77a89b2 check_configtool.sh: remove test files on success. 2016-06-06 14:18:02 +02:00
Markus Hitter e35fe22f74 check_configtool.sh: allow spaces in paths.
To the best of my bash script knowledge, this also means we have
to break on the first error, because pipe terms run in a subshell,
so they can't pass variables to the parent.
2016-06-06 14:15:14 +02:00
Phil Hord 21ac717d6d Configtool: add integrity tests for Configtool output.
Add a test that puts the stock config files through the
Configtool input/output parsers and verifies the output matches
the input.  If Configtool breaks down in the future and produces
different output, this should catch it.

If this fails because of some intentional change in the tool or
in the stock config files, then the tool or stock config files
should be updated to be compatible again before merging the result.
2016-06-06 12:36:53 +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
Phil Hord 92a303c607 Add testcase for corexy homing bug 2016-05-26 11:22:12 +02:00
Markus Hitter bb56874088 Regressiontests: add a test for ATmega328, I2C, SSD1306. 2016-05-06 20:34:18 +02:00
Markus Hitter 535fa0c171 check_integrity.sh: remove the -c option from awk invocations.
Ubuntu now (16.04) comes with 'mawk', which doesn't recognize the -c
option, so simply remove it. Its meaning was to switch into 'traditional'
mode.
2016-05-06 19:37:56 +02:00
Markus Hitter a97ec8a376 Display: introduce displaybus.h.
This is a broker for mapping display bus calls to the bus actually
in use.
2016-04-26 14:13:15 +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
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 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 4c205704ad config.h.Profiling: add Z_AUTODISABLE here, too. 2016-03-27 20:41:36 +02:00
Phil Hord 6ef35a11f2 Add test for "no endstops defined" build
This configuration used to fail.  Now it's fixed.  Test the
configuration to ensure it doesn't break again in the future.
2015-11-18 14:53:12 -05: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 ab910ee1c4 ARM: add Gen7-ARM to the series of regression tests.
Now ARM based boards are covered as well :-)
2015-08-12 14:26:36 +02:00
Markus Hitter fa8ec35bc1 run-in-simulavr.sh: report LED on time in clocks instead of ns. 2015-08-04 23:03:51 +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 b3ff59fca1 run-in-simulavr.sh: make it aware of USER_CONFIG.
Now one can build and run tests with a custom configuration.
2015-07-24 17:37:43 +02:00
Markus Hitter 1509e5b3c8 testcases/config.h.Profiling: remove #include "arduino.h".
Was forgotten when moving this include into config_wrapper.h. Now
this config can also be used with USER_CONFIG.
2015-07-24 15:13:49 +02:00
Markus Hitter 1eb7e73273 Introduce regression tests.
For now this is just a number of different configurations and a
makefile target, "make regressiontests", to build with them.
Further tests, e.g. using SimulAVR or the hostside simulator
to check actual behaviour of the firmware are welcome.
2015-07-13 14:00:33 +02:00
Markus Hitter bf6fd141c0 G-code parser: add a number of test strings.
We're about to change substantial parts of the parser, so we need
to verify it doesn't become messed up.
2015-07-05 23:32:48 +02:00
jbernardis ae8a2a2b59 Configtool: remove Analog Reference user choice.
This was previously made obsolete in the firmware code already.
See previous commits.

This should solve issue #138.

In case it ever turns out this was a poor decision, it's likely
a good idea to re-add this to the board configuration instead of
the printer configuration.
2015-05-11 02:03:47 +02:00
jbernardis 5b5032f87f Configtool: don't make DEBUG configuration user-visible.
Debug stuff is meaningful for developers, only. Also often
enabled on a per-file basis depending on the problem at hand.
Two reasons to remove it from Configtool and one reason to
remove it from the config files.

This should solve issue #137.
2015-05-08 20:38:23 +02:00
Markus Hitter f734b225eb Rename ThermistorTable.h to thermistortable.h.
This is purely cosmetics to match naming conventions of other
files. No functional change.
2015-05-04 20:08:39 +02:00
Markus Hitter 6f85f625cc Remove ThermistorTable{single|double}.h.
These are no longer needed, as they're now created on the fly by
Configtool.

Also pick unique information from there over to Configtool, see
the change in configtool/addsensordlg.h.
2015-05-04 19:55:16 +02:00
Markus Hitter 6afddf5680 run-in-simulavr.sh: implement G-code sending handshaking.
Now it waits for an "ok" before sending the next line, like all
the G-code sending hosts do. This allows sending arbitrarily long
G-codes. The 60 seconds simulated time limit is still in place to
avoid endless simulations.

The standard performance simulation now runs more G-code and
results in slightly different numbers accordingly:

cd testcases
./run-in-simulavr.sh short-moves.gcode smooth-curves.gcode triangle-odd.gcode

    FLASH  : 20540 bytes         144%        67%        33%      16%
    RAM    :  2188 bytes         214%       107%        54%      27%
    EEPROM :    32 bytes           4%         2%         2%       1%

short-moves.gcode statistics:
LED on occurences: 888.
LED on time minimum: 304 clock cycles.
LED on time maximum: 720 clock cycles.
LED on time average: 313.256 clock cycles.

smooth-curves.gcode statistics:
LED on occurences: 36511.
LED on time minimum: 304 clock cycles.
LED on time maximum: 706 clock cycles.
LED on time average: 349.172 clock cycles.

triangle-odd.gcode statistics:
LED on occurences: 1636.
LED on time minimum: 304 clock cycles.
LED on time maximum: 710 clock cycles.
LED on time average: 332.32 clock cycles.
2015-04-21 02:51:32 +02:00
Markus Hitter 74c9924366 run-in-simulavr.sh: make stopping on "stop" working again.
It was so far unnoticed that the "simulavr" program is only a
script when run from within the build directory. Still killing it
by name worked, because bash's exec didn't terminate the initiating
script.

Apparently this week Ubuntu updated bash and the new version now
terminates the initiating script (which is a good idea), but now
the executable to kill by name has a different name. It's prefixed
with "lt-". As this "lt-" is hardcoded we can rely on it.
2015-04-21 02:51:31 +02:00
Markus Hitter 1cd21251d2 Get rid of STEP_INTERRUPT_INTERRUPTIBLE.
It was certainly a good idea, but also always a suspect of
malfunctions and as such, almost never used. Newer code
organisation moves most of the code behind it to dda_clock()
anyways, so it also became mostly obsolete.

Rest In Peace, STEP_INTERRUPT_INTERRUPTIBLE, you were matter
of quite a number of interesting discussions and investigations.

Changes for Configtool by jbernardis <jeff.bernardis@gmail.com>
2015-04-21 02:11:01 +02:00
Markus Hitter 45baa75a5d CoreXY: tell config.h templates about KINEMATICS_COREXY. 2014-12-26 19:41:37 +01:00
Markus Hitter be0af71b2e CoreXY: distribute new KINEMATICS definition to all config.h templates. 2014-12-26 19:41:37 +01:00
Markus Hitter 9f618ee048 Testcases: add nothing.gcode.
This is for running stuff with run_in_simulavr.sh which needs no
G-code.
2014-10-18 20:59:41 +02:00
Markus Hitter e0ee76b54e heater.c: add a hysteresis when using BANG_BANG.
Before, the heater would turn off and on at each tiny temperature
fluctuation. Or better: at every tiny analog voltage fluctuation.
2014-10-18 20:58:35 +02:00