1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-16 04:45:18 +03:00

initial log window implementation

This commit is contained in:
cTn 2014-02-03 06:19:06 +01:00
parent cc3b2a3f36
commit 2ebd108f43
4 changed files with 38 additions and 3 deletions

View file

@ -163,6 +163,18 @@ GUI_control.prototype.timeout_kill_all = function() {
return timers_killed;
};
// message = string
GUI_control.prototype.log = function(message) {
var command_log = $('div#log');
var d = new Date();
var time = ((d.getHours() < 10) ? '0' + d.getHours(): d.getHours())
+ ':' + ((d.getMinutes() < 10) ? '0' + d.getMinutes(): d.getMinutes())
+ ':' + ((d.getSeconds() < 10) ? '0' + d.getSeconds(): d.getSeconds());
$('div.wrapper', command_log).append('<p>' + time + ' -- ' + message + '</p>');
command_log.scrollTop($('div.wrapper', command_log).height());
};
// Method is called every time a valid tab change event is received
// callback = code to run when cleanup is finished
// default switch doesn't require callback to be set