microsoft / devicescript

TypeScript for Tiny IoT Devices (ESP32, RP2040, ...)
https://microsoft.github.io/devicescript/
MIT License
3.23k stars 111 forks source link

> The startAccelerometer returns a client that is already bound to your server so you don't need the "const a .... " line. You can simply remove it. #659

Closed pelikhan closed 7 months ago

pelikhan commented 7 months ago

The startAccelerometer returns a client that is already bound to your server so you don't need the "const a .... " line. You can simply remove it.

But if I remove that line, the subscription does not work anymore for some reason. I made a repository for the code. I'm using the pico board with pins set up correctly, I'm just stuck with this. Sure I must be missing something trivial here...

Originally posted by @szmarci in https://github.com/microsoft/devicescript/discussions/655#discussioncomment-7481772

pelikhan commented 7 months ago

Added repro https://github.com/microsoft/devicescript/commit/11be29cd39b2beda01d16ecb5b1a40dcfc941f09

pelikhan commented 7 months ago

@mmoskal there is a strange packet routing issue here. The reading packet is not routed to the client that is instanciated in a class instance function.

pelikhan commented 7 months ago

@mmoskal