mirror of
https://github.com/MultiMote/niimbluelib.git
synced 2025-03-16 19:41:01 +03:00
13 lines
464 B
JavaScript
13 lines
464 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 ? "❌" : "0x" + Utils.bufToHex(v, ", 0x");
|
|
console.log(`| 0x${tx} | ${txName} | ${rx} |`);
|
|
});
|