Gauge critical value on the min end

I have an application where the critical value of the gage is actually from 0 to a certain value, so on the beginning of the scale. Any value higher than that is good. Currently as far as I can see this is not possible to achieve.

I’ve had an idea how to implement this very simply without breaking existing code. Just accept a negative value of lv_gauge_set_critical_value(). So calling it with -10 on a scale from 1-100 would have 0-10 critical.

What do you think?

1 Like

It’s really not possible now as the critical value is always placed in the end of the scale.

Your idea sounds great!

Can you send a Pull request with these updates?

I’ll try! I just had a closer look and it seems the gauge is encapsulated in the line meter that i was not immediately able to understand. A call to lv_gauge_set_critical_value() is actually nothing more than a call to lv_linemeter_set_value. I have no immediate idea on how to modify this to keep the functionality for the linemeter and extend the functionality of the gauge. I’ll need to do more code reading on that …