You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
566 B
JavaScript

const PagerDevice = require("./Device")
const Str = require('@supercharge/strings')
// Birdy Slim (IoT) Device
class BirdySlim extends PagerDevice {
constructor () {
super()
this.duplex = true
this.name = "birdyslim"
}
RandID() {
return `B${ Str.random(4) }`
}
async formatTX(msg) {
msg.id = this.RandID()
await MessageManager.BindMsg(msg)
msg.payload = `${ msg.id }${ msg.payload }`
msg._routerData = {
duplexCapable: true,
}
}
}
module.exports = BirdySlim