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

This commit is contained in:
Philippe Teuwen committed 2024-10-29 21:13:38 +01:00
1 parent 57ec287ab0
commit de96479d80
16 files changed
+4341 -4193

No files matched your search

+4 -2
View File
@@ -58,12 +58,14 @@ void pm3_close(pm3_device_t *dev) {
free_grabber();
}
int pm3_console(pm3_device_t *dev, const char *cmd, bool passthru) {
int pm3_console(pm3_device_t *dev, const char *cmd, bool capture, bool quiet) {
// For now, there is no real device context:
(void) dev;
uint8_t prev_printAndLog = g_printAndLog;
if (! passthru) {
if (capture) {
g_printAndLog |= PRINTANDLOG_GRAB;
}
if (quiet) {
g_printAndLog &= ~PRINTANDLOG_PRINT;
}
int ret = CommandReceived(cmd);