Re: [dev] Re: [slstatus] temperature module acts wierd on OpenBSD

2020-11-30 Thread Aaron Marcher
Hey, is the problem still present with the commit i just pushed? 94b549a5ebe893bc727115ae845e51c4153f92e5 (Fix temperature reporting on OpenBSD) Regards, Aaron On 20-06-16 Tue, Laslo Hunhold wrote: On Tue, 16 Jun 2020 20:53:34 +0200 Mattias Andrée wrote: Dear Mattias, I'm assuming temp.val

[dev] Re: [slstatus] temperature module acts wierd on OpenBSD

2020-06-16 Thread messw1thdbest
Sorry, I messed up the formatting 22d21 < #include 48c47 < return bprintf("%d", (temp.value - 27315) / 1E6); --- > return bprintf("%d", (temp.value - 27315) / 100); Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, Jun

Re: [dev] Re: [slstatus] temperature module acts wierd on OpenBSD

2020-06-16 Thread Laslo Hunhold
On Tue, 16 Jun 2020 20:53:34 +0200 Mattias Andrée wrote: Dear Mattias, > I'm assuming temp.value i an `int`, as %d is used. The problem was > probably that `1E6` is actually a `double` rather than an `int`, > as the whole expression is promoted to `double`, because `bprintf` is > (I assume) vari

Re: [dev] Re: [slstatus] temperature module acts wierd on OpenBSD

2020-06-16 Thread Mattias Andrée
I'm assuming temp.value i an `int`, as %d is used. The problem was probably that `1E6` is actually a `double` rather than an `int`, as the whole expression is promoted to `double`, because `bprintf` is (I assume) variadic, and the compiler does not know to change the cast the expression back to `in

Re: [dev] Re: [slstatus] temperature module acts wierd on OpenBSD

2020-06-16 Thread Laslo Hunhold
On Tue, 16 Jun 2020 17:55:03 + messw1thdbest wrote: Dear messw1thdbest, > < return bprintf("%d", (temp.value - 27315) / 1E6); > --- > > return bprintf("%d", (temp.value - 27315)/100); I'm really intrigued by that; thanks for sending in this patch! W