consistently use server notation
This commit is contained in:
Родитель
f3da9cf7c2
Коммит
a34e165e17
|
@ -60,5 +60,5 @@ namespace jacdac {
|
|||
}
|
||||
|
||||
//% whenUsed
|
||||
export const logger = new LoggerServer()
|
||||
export const loggerServer = new LoggerServer()
|
||||
}
|
2
pxt.json
2
pxt.json
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
"public": true,
|
||||
"targetVersions": {
|
||||
"target": "3.1.70",
|
||||
"target": "3.1.75",
|
||||
"targetId": "microbit"
|
||||
},
|
||||
"supportedTargets": [
|
||||
|
|
|
@ -305,7 +305,7 @@ namespace jacdac._rolemgr {
|
|||
namespace jacdac {
|
||||
|
||||
//% fixedInstance whenUsed block="role manager"
|
||||
export const roleManager = new _rolemgr.RoleManagerServer()
|
||||
export const roleManagerServer = new _rolemgr.RoleManagerServer()
|
||||
|
||||
/*
|
||||
|
||||
|
|
18
routing.ts
18
routing.ts
|
@ -749,7 +749,7 @@ namespace jacdac {
|
|||
|
||||
function doNothing() {}
|
||||
|
||||
class ControlService extends Server {
|
||||
class ControlServer extends Server {
|
||||
constructor() {
|
||||
super("ctrl", 0)
|
||||
}
|
||||
|
@ -885,14 +885,14 @@ namespace jacdac {
|
|||
// only try autoBind, proxy we see some devices online
|
||||
if (_devices.length > 1) {
|
||||
// check for proxy mode
|
||||
jacdac.roleManager.checkProxy()
|
||||
jacdac.roleManagerServer.checkProxy()
|
||||
// auto bind
|
||||
if (autoBind) {
|
||||
autoBindCnt++
|
||||
// also, only do it every two announces (TBD)
|
||||
if (autoBindCnt >= 2) {
|
||||
autoBindCnt = 0
|
||||
jacdac.roleManager.autoBind()
|
||||
jacdac.roleManagerServer.autoBind()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1166,8 +1166,8 @@ namespace jacdac {
|
|||
log("jacdac starting")
|
||||
options = options || {}
|
||||
|
||||
const controlService = new ControlService()
|
||||
controlService.start()
|
||||
const controlServer = new ControlServer()
|
||||
controlServer.start()
|
||||
_unattachedClients = []
|
||||
_allClients = []
|
||||
//jacdac.__physStart();
|
||||
|
@ -1208,13 +1208,13 @@ namespace jacdac {
|
|||
|
||||
if (!options.disableLogger) {
|
||||
console.addListener(function (pri, msg) {
|
||||
if (msg[0] != ":") jacdac.logger.add(pri as number, msg)
|
||||
if (msg[0] != ":") jacdac.loggerServer.add(pri as number, msg)
|
||||
})
|
||||
jacdac.logger.start()
|
||||
jacdac.loggerServer.start()
|
||||
}
|
||||
if (!options.disableRoleManager) {
|
||||
roleManager.start()
|
||||
controlService.sendUptime()
|
||||
roleManagerServer.start()
|
||||
controlServer.sendUptime()
|
||||
}
|
||||
// and we're done
|
||||
log("jacdac started")
|
||||
|
|
4
test.ts
4
test.ts
|
@ -39,10 +39,10 @@ function jdpackTest() {
|
|||
// pins.A9.digitalWrite(false)
|
||||
|
||||
jacdac.consolePriority = ConsolePriority.Log;
|
||||
jacdac.roleManager.start()
|
||||
jacdac.roleManagerServer.start()
|
||||
jacdac.protoTestServer.start()
|
||||
jacdac.start()
|
||||
jacdac.logger.log("test started")
|
||||
jacdac.loggerServer.log("test started")
|
||||
modules.identify();
|
||||
|
||||
jdpackTest()
|
||||
|
|
Загрузка…
Ссылка в новой задаче