I made an auton recording function for skills (file below), but when I try running it, after about 30 seconds of random driver it reports it ran out of memory. To record, I am currently using dynamic arrays from BNS lib. There are 2 dynamic arrays for each part of the robot (6 arrays in total): one array stores sensor value, and the other array stores the time when the sensor value was recorded. When the auton runs, the code checks to see if there’s a matching time, and if so, will set the PID value at the current index from the other array. To record, I currently have the code check if there’s a difference in value in the controller, and if so, it will store the value. This is quite optimized from what I originally had (like recording the value every millisecond), but it only lasts about 30 seconds before running out of memory. Is there possibly another library with better memory management I could use? Is there a more optimized method of recording my auton?
scissor skills 254A.zip (54.4 KB)
Just realized there were a few errors in scissor skills.c
, here’s the fixed file:
scissor skills 254A.zip (54.3 KB)