pm3_console() in Python/Lua/C: replace passthru by capture and quiet

This commit is contained in:
Philippe Teuwen 2024-10-29 21:12:20 +01:00
commit de96479d80
16 changed files with 4341 additions and 4193 deletions

View file

@ -9,6 +9,6 @@ int main(int argc, char *argv[]) {
}
pm3 *p;
p = pm3_open(argv[1]);
pm3_console(p, "hw status", true);
pm3_console(p, "hw status", false, false);
pm3_close(p);
}

View file

@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
p = pm3_open(argv[1]);
// Execute the command
pm3_console(p, "hw status", false);
pm3_console(p, "hw status", true, true);
const char *buf = pm3_grabbed_output_get(p);
const char *line_start = buf;

View file

@ -12,7 +12,7 @@ for line in p.grabbed_output:gmatch("[^\r\n]+") do
end
print("Device:", p.name)
p:console("Rem passthru remark! :coffee:", true)
p:console("Rem passthru remark! :coffee:", false, false)
local json = require("dkjson")
print("Fetching prefs:")

View file

@ -11,7 +11,7 @@ for line in p.grabbed_output.split('\n'):
if "uC:" in line:
print(line)
print("Device:", p.name)
p.console("Rem passthru remark! :coffee:", True)
p.console("Rem passthru remark! :coffee:", capture=False, quiet=False)
import json
print("Fetching prefs:")