Fix sensors
Signed-off-by: Vasiliy Doylov <nekodevelopper@gmail.com>
This commit is contained in:
parent
ca63caddc5
commit
ae66f1325d
1 changed files with 6 additions and 3 deletions
|
@ -22,9 +22,12 @@ class TheCatTools.GUI.BoubleBar : Gtk.DrawingArea, Gtk.Orientable {
|
|||
var line_width = height / 120;
|
||||
var gap = line_width;;
|
||||
var radius = width / 2 - gap;
|
||||
var value = value % 90;
|
||||
value += 90;
|
||||
value *= -1;
|
||||
var val = value + 90;
|
||||
if (val > 180)
|
||||
val = 360 - val;
|
||||
if (val < 0)
|
||||
val = val * -1;
|
||||
var value = val;
|
||||
var position = radius + (height - radius * 2) * value / 180;
|
||||
message ("%f = %f", value, position);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue