[PATCH] Display even constant temperature graph
torvalds at linux-foundation.org
Thu Jan 24 08:20:58 PST 2013
On Thu, Jan 24, 2013 at 7:03 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Jan 24, 2013, at 2:44 AM, Miika Turkia wrote:
>> Dive profile does not display the temperature graph, if we have a
>> constant temperature (e.g. only one reading at the start of the dive).
>> This patch draws the temperature graph even if max and min temperatures
>> are the same.
> I'll ask Linus to confirm this, but I'm reasonably certain that this was intentional.
It was indeed intentional ("constant temperature isn't very
interesting"), but I'm not going to claim that it's necessarily the
right choice. It might be better to show the boring line than to not
show it: if you switch between dives and just look at the profile
view, then even a straight line is "interesting", and gives you
relevant data. So while it is intentional, I'm not going to claim that
it's necessarily the right thing.
That said, somebody *does* need to make sure that the scaling doesn't
then divide-by-zero or something like that. On x86 (at least under
Linux), the default behavior for divide-by-zero in floating point is
to just an SNaN (or maybe it's an infinity), so you can have
divide-by-zero bugs that you just never see.
More information about the subsurface