I've been looking, but I'm not sure how what I've found helps me. I would like to use a text file to make something like a lookup table. Here's what I have for logic so far:
Code:
/*hopefully all of this data can be collected
and stored in a text file elsewhere during one
of the autonomous modes (collect)*/
int arrayLength = 7;
/*probbly 150-1500 depending on if the data
samples are in tenths or hundredths of a second.
Tenths here, and assuming that the autonomous
period is only 15 seconds*/
float leftside [] = {1,0.9,0.7,0.9,1,0.3,0.9}; //etc...etc..
float rightside [] = {1,1,0.8,1,1,0.4,1}; //etc...etc...
for (int i = arrayLength; i > 0; i--)
{
Leftmotor->Set(leftside[i])
Rightmotor->Set(rightside[i])
Wait(0.1);
/*Wait the same interval of time as the data
collected. 0.1 for tenths, 0.01 for hundredths,
etc...*/
}
/*Implimentation: Record encoder data during practice
rounds in special dedicated autonomous to a text file.
Then play back the data in another autonomous mode
(case 2). This may not all be syntactically correct*/
(I'm not entirely sure what the encoder sample rate/second is)