mirror of
https://github.com/MultiMote/niimbluelib.git
synced 2025-03-17 12:01:00 +03:00
13 lines
472 B
JavaScript
13 lines
472 B
JavaScript
|
import { RequestCommandId, commandsMap, Utils } from "../dist/index.js";
|
||
|
|
||
|
console.log("| Request ID | Name | Response ID(s) |");
|
||
|
console.log("|------|------------|------|");
|
||
|
|
||
|
Object.entries(commandsMap).forEach(([k, v]) => {
|
||
|
if (k == "-1") return;
|
||
|
const tx = Utils.bufToHex([parseInt(k)]);
|
||
|
const txName = RequestCommandId[parseInt(k)];
|
||
|
const rx = v === null ? "⚠ one way" : "0x" + Utils.bufToHex(v, ", 0x");
|
||
|
console.log(`| 0x${tx} | ${txName} | ${rx} |`);
|
||
|
});
|