MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / doDeactivate

Function doDeactivate

modules/drivers/w3csensor/sensor.c:492–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492void doDeactivate(xsSensor sensor)
493{
494 xsMachine *the = sensor->the;
495
496 if (kStateIdle == sensor->state)
497 return;
498
499 sensor->state = kStateIdle;
500
501 if (sensor->timer) {
502 modTimerRemove(sensor->timer);
503 sensor->timer = NULL;
504 }
505
506 xsTry {
507 xsCall0(sensor->obj, xsID__deactivate);
508 }
509 xsCatch {
510 }
511}

Callers 2

xs_sensor_stopFunction · 0.85
triggerErrorEventFunction · 0.85

Calls 1

modTimerRemoveFunction · 0.50

Tested by

no test coverage detected