Files

copied
Last update 8 years 9 months by Raivo Laanemets
Filespclib
..
args.js
command_queue.js
command_run.js
commands.js
connection.js
control.js
decode.js
decode_line.js
encode.js
help.js
pearson.js
help.js
var commands = require('./commands'); module.exports = function() { var list = Object.keys(commands).sort(); console.log('Usage: avrcooling --port <port> --command <command> [arguments]'); console.log('Recognized commands: '); list.forEach(function(name) { var command = commands[name]; if (command.description) { console.log(' ' + pad(name.toLowerCase(), 14) + ' ' + command.description); } }); }; // Pads the given string to // reach the given length. function pad(string, length) { var count = length - string.length; if (count > 0) { return string + Array(count + 1).join(' '); } return string; }
Report a bug