call identify in tests
This commit is contained in:
Родитель
8655ba57c4
Коммит
bf75be7d2c
2
pxt.json
2
pxt.json
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
"public": true,
|
||||
"targetVersions": {
|
||||
"target": "3.1.52",
|
||||
"target": "3.1.53",
|
||||
"targetId": "microbit"
|
||||
},
|
||||
"supportedTargets": [
|
||||
|
|
14
routing.ts
14
routing.ts
|
@ -655,13 +655,13 @@ namespace jacdac {
|
|||
*/
|
||||
//% whenUsed
|
||||
export let onIdentifyRequest = () => {
|
||||
if (!pins.pinByCfg(DAL.CFG_PIN_LED))
|
||||
return
|
||||
for (let i = 0; i < 7; ++i) {
|
||||
setPinByCfg(DAL.CFG_PIN_LED, true)
|
||||
pause(50)
|
||||
setPinByCfg(DAL.CFG_PIN_LED, false)
|
||||
pause(150)
|
||||
if (pins.pinByCfg(DAL.CFG_PIN_LED)) {
|
||||
for (let i = 0; i < 7; ++i) {
|
||||
setPinByCfg(DAL.CFG_PIN_LED, true)
|
||||
pause(50)
|
||||
setPinByCfg(DAL.CFG_PIN_LED, false)
|
||||
pause(150)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
1
test.ts
1
test.ts
|
@ -43,6 +43,7 @@ jacdac.roleManagerHost.start()
|
|||
jacdac.protoTestHost.start()
|
||||
jacdac.start()
|
||||
jacdac.loggerHost.log("test started")
|
||||
modules.identify();
|
||||
|
||||
jdpackTest()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче