 
 .controller('widgetCtrl', [
   '$scope'
-  '$interval'
   'widgetFactory'
   'robot'
 
-($scope, $interval, widgetFactory, robot) ->
+($scope, widgetFactory, robot) ->
   $scope.widgets = []
   $scope.mostRecentWidget = {}
 

      update: -> _.each(_data, (element, index, list) ->
        element.values =  element.peripheral.historyPairs())
      url: defaultURL.replace('type', String(type))
      render: true
      position: null
      options: {
        chart: {


  $scope.addWidget = (peripheralFilter = {id: -1}) ->
    $scope.widgets.push new widgetFactory(robot.peripheral(peripheralFilter), 'linechart')
    $scope.widgets[$scope.widgets.length-1].update()

  $scope.removeWidget = (widget) ->
    id = widget.id
