rjaros87 / pm-home-station

Indoor use particulate matter sensor on USB or Bluetooth
GNU General Public License v3.0
33 stars 5 forks source link

[Android] Percentage values go Integer.MAX when changing orientation #13

Closed pskowronek closed 6 years ago

pskowronek commented 6 years ago

Percentage values go Integer.MAX_VALUE when changing orientation.

To reproduce:

rjaros87 commented 6 years ago

👍 confirm.

sanchin commented 6 years ago

Yeah, I know, my brother even called me with that (first Github issue I received by a phone ;D)

I'll look into that during the weekend, although it seems weird since the values get updated with read, and after the rotation they should be initialized with null / empty / zeros, same as when the app launches. What weird mathematical operation can result in MAX_VALUE? As in - division by zero (nah, exception), etc?

pskowronek commented 6 years ago

fixed