commit
a0d67f2783
|
@ -17,7 +17,7 @@ angular.module('FarmBot').controller "OverviewController", [
|
|||
$scope.goHome = ->
|
||||
$scope.socket.emit "message",
|
||||
devices: $scope.device.uuid
|
||||
payload:
|
||||
message:
|
||||
message_type: 'single_command'
|
||||
time_stamp: new Date()
|
||||
command:
|
||||
|
@ -26,7 +26,7 @@ angular.module('FarmBot').controller "OverviewController", [
|
|||
y: 0
|
||||
z: 0
|
||||
speed: 100 # Not sure about this one.
|
||||
amount: null # Is this for "DOSE WATER"?
|
||||
amount: 0 # Is this for "DOSE WATER"?
|
||||
delay: 0
|
||||
, (data) ->
|
||||
console.log data
|
||||
|
@ -34,9 +34,9 @@ angular.module('FarmBot').controller "OverviewController", [
|
|||
|
||||
$scope.connectToSkyNet = ->
|
||||
config =
|
||||
type: "farmbot"
|
||||
uuid: $scope.device.uuid
|
||||
token: $scope.device.token
|
||||
type: "farmbotdss"
|
||||
uuid: "901ba251-ed7a-11e3-995a-b7667747c514"
|
||||
token: "32pwbkzd7qp06bt9zznee5xjhc7kfbt9"
|
||||
protocol: "websocket"
|
||||
skynet config, (e, socket) ->
|
||||
throw e if e
|
||||
|
@ -44,4 +44,8 @@ angular.module('FarmBot').controller "OverviewController", [
|
|||
$scope.socket.on "message", (message) ->
|
||||
console.log "message received", message
|
||||
|
||||
$scope.debug = ->
|
||||
$scope.socket.emit "message", JSON.parse($scope.message), (data) ->
|
||||
console.log data
|
||||
|
||||
]
|
||||
|
|
|
@ -41,5 +41,11 @@
|
|||
%a.button.small{href: "#"} Calibrate
|
||||
%li
|
||||
%a.button.small.alert{href: "#"} Shutdown
|
||||
.large-4.columns
|
||||
%iframe{frameborder: "0", height: "234", scrolling: "no", src: "http://www.ustream.tv/embed/18045763?v=3&wmode=direct", style: "border: 0px none transparent;", width: "360"}
|
||||
.row
|
||||
.large-6.columns
|
||||
%iframe{frameborder: "0", height: "234", scrolling: "no", src: "http://75.128.5.101:8081/", style: "border: 0px none transparent;", width: "800", height: "600"}
|
||||
.large-6.columns
|
||||
%h1 debugger (Hi Tim!)
|
||||
%form{ng_submit: 'debug()'}
|
||||
%textarea{rows: "30", cols: "25", ng_model: 'message'}
|
||||
%input.button{name: "commit", type: "submit", value: "Send"}
|
||||
|
|
Loading…
Reference in New Issue