1 local pm3
= require("pm3")
5 p
:console("hw version")
6 for line
in p
.grabbed_output
:gmatch("[^\r\n]+") do
7 if line
:find("Unique ID") or line
:find("uC:") then
12 print("Device:", p
.name
)
13 p
:console("Rem passthru remark! :coffee:", false, false)
15 local json
= require("dkjson")
16 print("Fetching prefs:")
17 p
:console("prefs show --json")
18 local prefs
, err
= json
.decode(p
.grabbed_output
)
20 print("Error decoding JSON: ", err
)
22 print("Save path: ", prefs
['file.default.savepath'])
23 print("Dump path: ", prefs
['file.default.dumppath'])
24 print("Trace path:", prefs
['file.default.tracepath'])