Optimizing commander USB transfer

Im moving this to a new thread. From Rev_3 e-MTB front mount - #29 by Valentine

@runger

Me too on OS X…

Just found this on USB byte transfer on MAC vs PC…

https://www.pjrc.com/teensy/benchmark_usb_serial_receive.html

Are you saying there is no lag on a MAC? And that it essentially is a Windows issue?

No no, I did say that there is lag in some situations - sometimes I have to disconnect and reconnect to kind of “reset” things. But the tool is in development, and its already a big improvement over what we had, which was nothing :wink:

That said, in my limited foray into the embedded world there are significant differences when using serial (and USB) on the different platforms - due to drivers (or lack thereof), software tools (or lack thereof, or incompatibility thereof), and more… so it is quite possible the USB to serial experience on the Mac is somewhat different, but in the case you describe I doubt it, since it sounds like the problem originates on the sending (MCU) side.

1 Like

True,

It does seem like the parsing of “states” in sFoCstudio was initially intended for monitoring.

I think there might be a real improvement hidden here. Looking forward to see some test using native USB with sFoCstudio. Maybe also with regards to the loop´s per sec. while monitoring. Unfortunately i’m unable to help out with the PR. I tried to get my head around the .py world, but it is a pretty steep learning curve.

Regarding the possible RAM leak when using strings, I see there is a recent update on the safeString lib. adding M4 and M0 MCU support. Guess this is where the hardware specific MCU crash with the fragmented Arduino world, when it comes to using these kinds of libraries…

Just came across this lib. It may be a starting point for optimizing the commander interface.

Found here:

1 Like