This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Javascript, use value of the main knx object and display a icon
#1
Greetings.

Im have a bit wise encoded knx objects (lots).  I would like to bitmask part out and animate a icon via the remaining part but have become stuck at the point of selecting the icons attached. 

Is it possible to select what icon is displayed (from a normal animated icon), eg if "faults" value = 0 show one icon 1 to 5 show a diffecent icon, >5 show another?  Or an I going down a dead end here and just create/calculate numeric ranges in the icon animation.

Baised from the "Group Address value in SVG icon" example
$(function(){
  $('.faultIcon').each(function(i, el) {
    var $el = $(el), addr = $el.data('object'); // or 'status-object'

    grp.listen(addr, function(obj) {
     var faults  =   obj.value & 3F000000;
     faults = faults >> 24;
     ?????????? 
    });

  });
});



Robert.
Reply


Messages In This Thread
Javascript, use value of the main knx object and display a icon - by equalizer - 30.10.2019, 15:48

Forum Jump: