mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Merge branch 'develop' of http://ghe.amb.ca.local/stf/stf into develop
Conflicts: res/app/components/stf/screen/screen.jade res/app/device-control/device-control.css res/app/scripts/controllers/DeviceScreenCtrl.js res/app/scripts/services/ControlService.js
This commit is contained in:
commit
c319945d37
13 changed files with 530 additions and 76 deletions
|
@ -8,7 +8,6 @@ var validator = require('express-validator')
|
|||
var socketio = require('socket.io')
|
||||
var zmq = require('zmq')
|
||||
var Promise = require('bluebird')
|
||||
var adb = require('adbkit')
|
||||
|
||||
var logger = require('../util/logger')
|
||||
var pathutil = require('../util/pathutil')
|
||||
|
@ -309,32 +308,6 @@ module.exports = function(options) {
|
|||
])
|
||||
})
|
||||
|
||||
function fixedKeySender(klass, key) {
|
||||
return function(channel) {
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.envelope(new klass(
|
||||
key
|
||||
))
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
socket.on('input.back', fixedKeySender(
|
||||
wire.KeyPressMessage
|
||||
, adb.Keycode.KEYCODE_BACK
|
||||
))
|
||||
|
||||
socket.on('input.home', fixedKeySender(
|
||||
wire.KeyPressMessage
|
||||
, adb.Keycode.KEYCODE_HOME
|
||||
))
|
||||
|
||||
socket.on('input.menu', fixedKeySender(
|
||||
wire.KeyPressMessage
|
||||
, adb.Keycode.KEYCODE_MENU
|
||||
))
|
||||
|
||||
socket.on('flick', function(data) {})
|
||||
socket.on('back', function(data) {})
|
||||
socket.on('forward', function(data) {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue