msupply-foundation / msupply-cold-chain

Android application for viewing and monitoring temperatures of fridges
GNU General Public License v3.0
3 stars 3 forks source link

Icons and colours on CCA are not updated to reflect the breaches/temperatures #297

Open marthakeezy opened 4 months ago

marthakeezy commented 4 months ago

Describe the bug

For the sensor at the top, I imitated hot breach -> cold breach -> hot breach.

For the sensor at the bottom, I imitated cold breach -> hot breach -> cold breach.

I noticed the icons have not changed - e.g. 25 degrees is showing as cold breach and 7 degrees is showing hot breach (even though this one is actually within the 2-8 degrees window of normal temperature). The icons (between hot and cold) seem to be alternating.

photo_2024-03-06 14 46 28

https://github.com/msupply-foundation/msupply-cold-chain/assets/153777484/c3a98ff8-b52b-4c23-a0bc-ab84e83f4e7a

To Reproduce Steps to reproduce the behavior:

  1. Connect your sensors to CCA
  2. Use 2 sensors for faster results
  3. For sensor 1: heat up to produce a hot breach -> cool down to produce a cool breach -> heat up to produce a hot breach
  4. For sensor 2: cool down to produce a cool breach -> heat up to produce a hot breach -> cool down to produce a cool breach
  5. Check CCA -> Sensors
  6. See errors

Expected behavior

Regardless of how many times the sensor breaches between hot and cold, the icons and colours should always be accurate. In this case, by the end of testing, one sensor is producing a hot breach and the second sensor is actually within the normal temperature window, but still shows as breaching (incorrectly too).

Smartphone (please complete the following information):

marthakeezy commented 3 months ago

Another instance of this issue -> for the sensor at the top, it had a hot breach for a while and then I moved it to the fridge. The temperature is displayed accurately (e.g. 6 degrees), however the icon/colour do not match the fact it's been within the normal temperature window for a while.

Image