hashashin / OctoPrint-OpiTemp

Simple plugin to show Orange Pi (running armbian) SOC temperature in the navbar.
1 stars 2 forks source link

change the thresholds and icons color #4

Closed alakond closed 6 years ago

alakond commented 6 years ago

Hey. Thnx for plugin. How do I change the thresholds, the icon color, or the icon itself?

hashashin commented 6 years ago

Hi @alakond. Right now the "icon" (it's an HTML emoji actually) it's hard coded, you need to look into: https://github.com/hashashin/OctoPrint-OpiTemp/blob/master/octoprint_opitemp/static/js/opitemp.js#L14 And if by thresholds you mean refresh interval, it's also hard coded to 10s right now: https://github.com/hashashin/OctoPrint-OpiTemp/blob/master/octoprint_opitemp/__init__.py#L17 I'll make them configurable and make a new release. Perhaps later today, no promises 😄.

Thanks, salud.

alakond commented 6 years ago

No, I thought that you could set thresholds for example from 0 to 50С - gray icon from 50 to 55С - yellow icon from 55 and above - red icon My icon is this

And on your screenshot like this:

hashashin commented 6 years ago

Oh, I see. That's because different browsers/systems have variations for the same emoji. ex: 🍊 <- I see that as my screenshot and you should see it as yours (if you're using the same browser here and with octoprint webui).

Sorry for the misunderstanding... I'll make the changes to make those two variables configurable anyway, emoji html code and refresh rate.

About an actual threshold thingy I've no plans to do that, but it's not a bad idea for future versions, a PR will be welcomed.

alakond commented 6 years ago

:) Ok ) Thnx)