lg icon indicating copy to clipboard operation
lg copied to clipboard

lgTxBusy seems to get stuck in busy state forver after 20-30 invocations of this code on raspberry pi 5

Open robertsi opened this issue 1 year ago • 3 comments

float pulse_width = 0.5 + angle / 180 * 2; int servoCycles = 18; lgTxServo(_chip.getHandle(), gpio, pulse_width * 1000, 50, 0, servoCycles); while (lgTxBusy(_chip.getHandle(), gpio, LG_TX_PWM)) lguSleep(0.01);

robertsi avatar Dec 25 '23 19:12 robertsi

Please supply a complete example with build instructions.

joan2937 avatar Dec 25 '23 21:12 joan2937

Complete code is here https://github.com/robertsi/yahboom-g1-tank/blob/f99b8805165f0e3a3e8f20b45430e0bbf7fa5aa5/g1-tank/include/g1-tank/tank.hpp#L380

I'm using cmake to build...instructions are here https://github.com/robertsi/yahboom-g1-tank/?tab=readme-ov-file#build

robertsi avatar Dec 26 '23 11:12 robertsi

Could you prepare a shorter example which shows the problem?

joan2937 avatar Dec 26 '23 13:12 joan2937