consistently use server notation

This commit is contained in:
Peli de Halleux 2021-04-21 07:09:39 -07:00
Родитель f3da9cf7c2
Коммит a34e165e17
5 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -60,5 +60,5 @@ namespace jacdac {
}
//% whenUsed
export const logger = new LoggerServer()
export const loggerServer = new LoggerServer()
}

Просмотреть файл

@ -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()
/*

Просмотреть файл

@ -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")

Просмотреть файл

@ -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()