Cogs, stack space, etc.,
Hugh
Posts: 362
Hi,
I have a couple of cogs monitoring switch positions and storing the position of the switches as global variables.
A main subroutine then accesses these values to take actions, etc.,
As I have built-up the main subroutine I have reached a point where the switches appear to be rapidly toggling on/off as the application progresses.
I've tried changing the stack-space allocated to the cogs monitoring the switches, but with no lock. Could the size of the main routine have reached the point where it has 'spilled over' into one of the switch-monitoring cogs, or could it be 'something else'?
Its got me scratching my head anyway.
Thanks
Hugh
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.
I have a couple of cogs monitoring switch positions and storing the position of the switches as global variables.
A main subroutine then accesses these values to take actions, etc.,
As I have built-up the main subroutine I have reached a point where the switches appear to be rapidly toggling on/off as the application progresses.
I've tried changing the stack-space allocated to the cogs monitoring the switches, but with no lock. Could the size of the main routine have reached the point where it has 'spilled over' into one of the switch-monitoring cogs, or could it be 'something else'?
Its got me scratching my head anyway.
Thanks
Hugh
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.
Comments
More likely the main rountine is having problems with its stack or that you didn't give enough stack to the other cogs.
You code however is more likely the problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
PS Please post or PM your routine to me so I can see how you approach it.
Another lesson learned!
Thanks
Hugh
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.