new: ble, can, hid and wifi modules will now set a custom prompt (closes #1117)

This commit is contained in:
Simone Margaritelli 2024-08-17 12:10:38 +02:00
commit 6282fe3451
7 changed files with 80 additions and 36 deletions

View file

@ -86,11 +86,15 @@ func (mod *HIDRecon) devPruner() {
}
}
const hidPrompt = "{by}{fw}HID {fb}{reset} {bold}» {reset}"
func (mod *HIDRecon) Start() error {
if err := mod.Configure(); err != nil {
return err
}
mod.SetPrompt(hidPrompt)
return mod.SetRunning(true, func() {
mod.waitGroup.Add(1)
defer mod.waitGroup.Done()