rodeo-sam / SolderingIron

An OpenSource Soldering Iron
GNU General Public License v2.0
18 stars 12 forks source link

Add an option to change temperature to funny units #58

Open yschroeder opened 9 years ago

yschroeder commented 9 years ago

There may be users who prefer to display the temperature in Fahrenheit. There should be a way to change the displayed temperature unit.

oni303 commented 9 years ago

I do not support units based on the coldest day in 1708 in Gdańsk. Is like taking a random foot of some random king to measure distances. Also we do not have the digit to indicate the unit.

rodeo-sam commented 9 years ago

i actually have a solution at hand and could push it but oni and kenog kind of disapprove of that. we could also implement some more temperature scale (kelvin, newton, ...).

yschroeder commented 9 years ago

Well, if we do not support Fahrenheit we sould also not support Celsius but only Kelvin as Celsius is defined by water temperature which is also pointless as we are dealing with tin melting temperatures...

I am not sure how soldering temperatures are handled in america, maybe it is also valid there to use Celsius but as you can set the temperature scale on other soldering irons, too, I thought it might be a nice option.

oni303 commented 9 years ago

freezing water is a much more reliable base than that day in 1708 or freezing " mixture of ice, water, and ammonium chloride, a salt, at a 1:1:1 ratio"[1]

But I am ok with having "funny unit support" with temperature scales like:

[1] http://en.wikipedia.org/wiki/Fahrenheit

yschroeder commented 9 years ago

Ok, then it is set. We need a define in config.h that allows all of the units @oni303 named. But we should make it as transparent as possible. all internals will still use celsius, only the display tells otherwise and the buttons should always count one up and down in the selected unit, not 1°C. That would cause too much confusion.

rodeo-sam commented 9 years ago

I'm on it..

rodeo-sam commented 9 years ago

done. (commit 6d11af117e2b8ceee2420c8064a899c11214336a)

please use display_temperature(int16_t number) from now on instead of display_number(int16_t number) when displaying a temperature.

oni303 commented 9 years ago

This is not done yet. If you want to support these units you have to build the same conversion for the buttons too. Otherwise the associated commit should be reverted.

rodeo-sam commented 9 years ago

2 thoughts for that:

I think both ways are possible. The first one seems easier and the second one more independent from the actual temperature on a specific scale.