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.
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.
Save a division at runtime by pre-calculating the slope between each
pair of adjacent thermistortable values. Since we use the larger value
each time, save the slope between two values A and B in the table
with the B data. Therefore the slope is that between each value and
its predecessor in the list.
Store this new value in the third element of the now 3-integers-wide
array which makes up the table. Use fixed-point 6.10 format to store
the slope. This is almost too narrow for some slopes and maybe it
should be changed to 8.8 fixed-point. In practice this presents a
loss in accuracy, but it is still significantly better than the
previous fixed-sample-size table production method. In particular no
provision is made to handle values which scale over 65535, and it
seems we should at least warn about this if not simply fail before
letting the user go off compiling his code.
Add a new flag TEMPTABLE_FORMAT and define it as 1 to tell the code
that we are using this new and incompatible format. This lets us
tolerate old hand-crafted thermistor tables by keeping the slower
algorithm in case one is still used. New thermistor tables should be
defined with this new format and with the FORMAT define set accordingly.
With the default 25 samples this adds 100 bytes to the flash image for
the thermistortable storage for two different thermistors. But the
code is simplified and saves me 134 bytes in the bargain for a net
decrease in flash size of 34 bytes.
The Thermistortablefile.py routine prematurely drops the
fractional part of the temperature when computing the 14.2
temperature values to emit in the code. Keep this instead until
the last moment when we finally calculate the integer format we
will store.
Temperature tables are emitted by selecting arbitrary sample values
to be used for the linear lookup table. This is fine in the range
where the thermistor produces linear output, but it is markedly wrong
near the extremes where the thermister output begins to curve.
Introduce a new sample selector which chooses samples based on the "most
incorrect estimate" and improves from there to ensure we get a cleaner
approximation across the selected range.
Traumflug: this topic is tracked here:
https://github.com/Traumflug/Teacup_Firmware/pull/208
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.
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).
This was forgotten with the recent move to storing configuration
items as tuples (value, enabled). It should fix the refusal to
build reported in issue #86.
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.
Previously they were evenly spaced across the temperature range,
now they're evenly distributed across the ADC range ... which
is not entirely the same.
This is related to issue #176.
This is, the parameter entry fields in the GUI, not in the
generated temperature table. Allowing floats is a tiny bit more
precise and also, more importantly, less confusing for the user.
--Traumflug
This is related to issue #176.
Previously, values of ignored keys simply got lost and were
replaced with the ones from from the metadata file. Now this
value is preserved and perhaps, some time in the future, we'll
use this bit of information to to provide the right value when
re-enabling it.
Previously they were dropped only at save time, which is too late
for the GUI. This is mostly for robustness, the case where a
value was removed from config files, but not yet from the GUI.
Shouldn't cause functional change.
So far, values commented out are still ignored, which is why the
used regexp changed. This will hopefully change in the future,
so a configuration can remember disabled values, too.
This solves the problem of choice menus being populated with too
many entries. Before, such menus would pick up values from
board.metadata as well as from the actually loaded file.
File printer.metadata contains no options, so no adjustment
needed there.
The idea is to open the user's email client automatically, so
(s)he has not much more to do than to write a sentence about what
went wrong. As easy as possible!
This is work related to issue #159.
The sensor dialog now checks present values against the list of
presets. This means, if a preset is used and then modified, the
preset choice jumps to <none>. It also means presets are recognized
when modifying a temperature sensor.
This should solve issue #155.
Validation is no longer required, as we now validate in the
creation dialog already. And coloring one item in a two-item list
almost looks like this item were highlighted.
That is, buttons and choices. Coices apparently don't work. Tried
a bit on the table heaters of the sensor and heater lists, but
found nothing which would result in an effect. This control is
not exactly well documented.
This should allow to build on any OS with Arduino IDE installed
and/or with avr-gcc & Co. available trough the normal shell.
Instead of looking at the current platform it's looked at wether
an Arduino IDE path is set. If yes, tools inside there are used.
If no such path is set, just the basename is used to let the OS
search for it ($PATH, etc.).
This is related to issue #152.
Tooltips don't size their box after line lengths, but have their
own idea on how wide to make it. Accordingly one should display
text with newlines only for paragraph delimiters.
This also required adjustments to all the board and printer
description comments. No functional change there.
This should solve issue #148.
Formerly, both names were arbitrary and the user had to know
that only heaters ans sensors with matching names would work
together. Accordingly, temp sensors can have only names matching
those of existing heaters. With the exception of "noheater",
which is also provided.
This kind of solves issue #143.
This looks like nitpicking right now, but further changes shall
provide only already existing heater names for temp sensor names,
so the former have to be defined first. Lead the user to follow
this strategy intuitively.
The problem was, applying tooltips to the radio buttons directly
showed no effect on Linux. While this is likely a bug in wxPython,
we can't change this behaviour.
The solution is to also apply these help texts to the surrounding
StaticBox. This works, even for the radio buttons.
This solves issue #149.
The problem was, that settings distributed in
configtool.default.ini were overridden once a configtool.ini was
created. Accordingly, users upgrading sources wouldn't see changes
in this file.
The solution is to move settings set by the distribution into a
separate file which isn't replaced by a user-saved one.
This should fix issue #142.
In case communications to the bootloader doesn't work as expected,
avrdude often takes many many minutes to recognize this, so it's
very convenient to be able to abort these fruitless attempts.
This should solve issue #131.
The Steinhart-Hart algorithm allows more precise thermistor
tables, but also requires more parameters, which aren't
available for all thermistors. Accordingly, add support for both,
the traditional logic using the beta parameter as well as the new
one.
This also adds thermistor-presets, so users can simply choose
from a pulldown-menu to set their thermistor.
Also, identical thermistors get merged into one table, saving
binary size.
Last not least, a few bugs in this area got fixed.
Usually, all these things go into separate commits, but they were
contributed all in one and separating them is a bit error-prone
for little gain.
This should address issue #130, #134 and #135.
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.
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.
This is the expected outcome, so explicitely reporting this, with
requiring the user to click a dialog box away, is kind of clutter.
This should solve issue #136.
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.
Previously, loading default configurations for board or printer,
then modifying them without saving them, then attempting to
build lead to a big mess, like attempting to save the board file,
failing in doing so and then building anyways.
It's rarely a good idea to overwrite files coming with a
distribution. Not for users, because they can't reset to factory
values; not for developers, because Git would pick up such changed
files.
Instead we read from configtool.default.ini now, but write to
configtool.ini. If configtool.ini is already present, it's
prefered over configtool.default.ini.