getColorCode = function(rssi)
    {
      var RSSI_BAD = -120.0;
      var RSSI_MEDIUM = -100.0;
      var RSSI_GOOD = -20.0;

      var rssi_color = function(lower_bound, upper_bound, rssi)
      {
        var result = 256 * (rssi - lower_bound) / (upper_bound - lower_bound);
        if (result < 0)   result = 0;
        if (result > 255) result = 255;
        return Math.round(result);
      };

      if (rssi > -65535)
      {
        var red = rssi_color(RSSI_GOOD, RSSI_MEDIUM, rssi);
        var green = rssi_color(RSSI_BAD, RSSI_MEDIUM, rssi);
        return "#" + ('00'+(red).toString(16)).substr(-2)
                   + ('00'+(green).toString(16)).substr(-2)
                   + "00";
      }
      else
        return "#000000";
    }
Startet die Aktualisierung der RSSI Werte