diff options
| author | cooljqln <cooljqln@noreply.codeberg.org> | 2025-08-29 05:40:22 +0200 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2025-08-29 05:40:22 +0200 |
| commit | 2f3e465bb81784388234b359ad2383f2701dd83c (patch) | |
| tree | 746d6497d7a720bc2d35581f09490e6097152ab9 | |
| parent | 8dff05abe4f4c94a5297f58220ae088cce53522f (diff) | |
| parent | 9112d97efb26866e1bded7d52884398711eed653 (diff) | |
| download | tangara-fw-2f3e465bb81784388234b359ad2383f2701dd83c.tar.gz | |
Merge pull request 'Add index column to `bt_list` command' (#434) from rwaskiewicz/tangara-fw:rw/add_idx_to_bt_list_command into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/434
| -rw-r--r-- | src/tangara/app_console/app_console.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tangara/app_console/app_console.cpp b/src/tangara/app_console/app_console.cpp index dcefc966..711f3d68 100644 --- a/src/tangara/app_console/app_console.cpp +++ b/src/tangara/app_console/app_console.cpp @@ -470,8 +470,10 @@ int CmdBtList(int argc, char** argv) { } AppConsole::sServices->bluetooth().pairedDevice(devices[index]); } else { - std::cout << "mac\t\tname" << std::endl; + std::cout << "index\tmac\t\tname" << std::endl; + auto idx = 0; for (const auto& device : devices) { + std::cout << std::setfill(' ') << std::setw(5) << idx++ << "\t"; for (size_t i = 0; i < device.mac.size(); i++) { std::cout << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>(device.mac[i]); |
