preparing some stuff for dongs

10.3.x-maintenance
cTn 2014-05-03 01:03:24 +02:00
parent a6fcdbdecf
commit 854a17e0f2
3 changed files with 15 additions and 0 deletions

View File

@ -294,6 +294,7 @@ GUI_control.prototype.tab_switch_cleanup = function(callback) {
break;
case 'firmware_flasher':
// this.interval_remove('factory_mode');
PortHandler.flush_callbacks();
// unbind "global" events

View File

@ -68,6 +68,9 @@ var serial = {
setControlSignals: function(signals, callback) {
chrome.serial.setControlSignals(this.connectionId, signals, callback);
},
getControlSignals: function(callback) {
chrome.serial.getControlSignals(this.connectionId, callback);
},
send: function(data, callback) {
var self = this;
self.output_buffer.push({'data': data, 'callback': callback});

View File

@ -245,6 +245,17 @@ function tab_initialize_firmware_flasher() {
}
*/
/*
GUI.interval_add('factory_mode', function factory_mode() {
serial.getControlSignals(function(result) {
if (result.cts == true) {
// Trigger regular Flashing sequence
$('a.flash_firmware').click();
}
});
}, 500);
*/
$(document).keypress(function(e) {
if (e.which == 13) { // enter
// Trigger regular Flashing sequence