Closed surfdado closed 5 months ago
I think the magic number is not needed really. If you connect something that sends undefined commands that pass the checksums you are in trouble anyway.
Well, since my pin lock PR hasn't gone anywhere there is actually one app with hundreds of users out there that uses that COMM id for pin lock - so the problem is not just hypothetical.
If we agree to define COMM_SHUTDOWN as 155 then we can avoid the magic nr I guess.
Just force-pushed a fixup to resolve merge conflicts...
You could put a pin-lock command in-between as a placeholder for now.
Okay, done and pushed
cmd[0] = 111 // magic number cmd[1] = [force] // 0=normal, 1=force (allow while motor is spinning) cmd[2] = [restart] // 0=shutdown, 1=restart
Obviously, shutdown only works for hardware with shutdown support