Crazy-Marvin / LibreLinkUpDesktop

This is a desktop application that fetches your blood sugar from LibreLinkUp
https://crazymarvin.com/librelinkupdesktop/
Apache License 2.0
29 stars 11 forks source link

Respect connection's target low and target high instead of 70-180 default #318

Closed dakyskye closed 2 months ago

dakyskye commented 2 months ago

:warning: Is your feature request related to a problem? Please describe.

I was reading the code and I came across this:

  const getColor = (value: number): string => {
    if (value > 70 && value < 180) {
      return "bg-green-500"
    }

    return "bg-yellow-500"
  }

this means values in range of 70-180 will be green and the rest will be yellow. But me personally, I want green for 80-160 range and I have applied this in my LibreLink app settings.

:bulb: Describe the solution you'd like.

According to this HTTP dump the data.connection object includes targetLow and targetHigh.

:bar_chart: Describe alternatives you've considered.

:page_facing_up: Additional context

:raising_hand: Do you want to develop this feature yourself?

dakyskye commented 2 months ago

Probably even support more colours like in the LibreLink app: bloody red for LO/HI and near LO; yellow for below target low and above target high; and orange-ish for above 240 (or something like that)