mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
refactor names
This commit is contained in:
parent
2aeb37ffa8
commit
1a76e7a50e
1 changed files with 5 additions and 5 deletions
10
index.html
10
index.html
|
|
@ -56,7 +56,7 @@
|
|||
<!-- actions -->
|
||||
<div class="border bg-gray-50 rounded shadow">
|
||||
<div class="p-3 space-x-1">
|
||||
<button @click="sendCommandAppStart" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
<button @click="getSelfInfo" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
AppStart
|
||||
</button>
|
||||
<button @click="sendZeroHopAdvert" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
<button @click="setAdvertLatLon" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
SetAdvertLatLon
|
||||
</button>
|
||||
<button @click="sendCommandAddUpdateContact" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
<button @click="addOrUpdateContact" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
AddUpdateContact
|
||||
</button>
|
||||
<button @click="syncNextMessage" class="border border-gray-500 px-2 bg-gray-100 hover:bg-gray-200 rounded">
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
return pathHashes.join(" -> ");
|
||||
|
||||
},
|
||||
async sendCommandAppStart() {
|
||||
async getSelfInfo() {
|
||||
const selfInfo = await this.connection.getSelfInfo();
|
||||
console.log(selfInfo);
|
||||
},
|
||||
|
|
@ -295,7 +295,7 @@
|
|||
console.log(lat, lon);
|
||||
await this.connection.setAdvertLatLong(lat, lon);
|
||||
},
|
||||
async sendCommandAddUpdateContact() {
|
||||
async addOrUpdateContact() {
|
||||
const publicKey = new Uint8Array([148, 63, 175, 162, 88, 212, 192, 40, 214, 185, 213, 140, 42, 145, 194, 186, 70, 71, 112, 68, 0, 192, 65, 4, 105, 143, 230, 50, 162, 79, 247, 192]);
|
||||
const type = Constants.AdvType.Chat;
|
||||
const flags = 0;
|
||||
|
|
@ -305,7 +305,7 @@
|
|||
const lastAdvert = 1739244825;
|
||||
const advLat = 0;
|
||||
const advLon = 0;
|
||||
await this.connection.sendCommandAddUpdateContact(publicKey, type, flags, outPathLen, outPath, advName, lastAdvert, advLat, advLon);
|
||||
await this.connection.addOrUpdateContact(publicKey, type, flags, outPathLen, outPath, advName, lastAdvert, advLat, advLon);
|
||||
},
|
||||
async syncNextMessage() {
|
||||
const message = await this.connection.syncNextMessage();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue