Main Site Documentation

G30 PWM stopping without calling stop


#1

I’m using the G30 and the PWM pin stops when the code is still running and the stop method is not called. So far this seems to be something to with load on the serial port but I haven’t yet narrowed it down any further.


#2

I bet you lost the reference and the garbage collector cleared it.


#3

That was what I was thinking but the reference is an instance variable and should not be being garbage collected at all. The containing class still exists because the main loop is running in it. It is behaving like the GC is under memory pressure and gets forced to get rid of something that hasn’t been accessed in a while even if the reference should still be intact.