Pinoccio / library-pinoccio

Arduino library for Pinoccio
Other
28 stars 24 forks source link

Silent mode #200

Closed quartzjer closed 10 years ago

quartzjer commented 10 years ago

This adds a new command to enable silent running mode, ensuring nothing is printed to Serial when any background commands are run.

Use just silent or silent(1) to put it in silent mode (it still prints to Serial when it receives commands from serial), and silent(0) to disable.

This is highly recommended to be put in startup functions when using scouts that aren't attached to USB and may be running commands that print to Serial, and it may even become the default soon if there's no issues found with it.

matthijskooijman commented 10 years ago

So, IIUC, commands executed from HQ now still reply to HQ and from serial still reply to serial because they pass an explicit Print& to Shell.eval, but all other ("background") evals print to Serial normally, and drop their output in silent mode?

matthijskooijman commented 10 years ago

Anyway, quick review of the code looks good (though it's 3:30 AM now, so it might not be the best review I ever did ;-p)

quartzjer commented 10 years ago

Yep, thx!