Skip to content
Snippets Groups Projects
Select Git revision
  • 75fe4eec83186bf77d68421dee56d4a346d9c20b
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
41 results

hardware.rst

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    signal.js 866 B
    "use strict"
    define(function () {
      return function (color) {
        var canvas = document.createElement("canvas")
        var ctx = canvas.getContext("2d")
        var v = null
        var radius = 1.2
        var highlight = false
    
        function drawPixel(x, y) {
          ctx.beginPath()
          ctx.fillStyle = color
          ctx.arc(x, y, radius, 0, Math.PI * 2, false)
          ctx.closePath()
          ctx.fill()
        }
    
        this.resize = function (w, h) {
          canvas.width = w
          canvas.height = h
        }
    
        this.draw = function (x, scale) {
          var y = scale(v)
    
          ctx.clearRect(x, 0, 5, canvas.height)
    
          if (y)
            drawPixel(x, y)
        }
    
        this.canvas = canvas
    
        this.set = function (d) {
          v = d
        }
    
        this.setHighlight = function (d) {
          highlight = d
        }
    
        this.getHighlight = function () {
          return highlight
        }
    
        return this
      }
    })