I have a program that is designed to mimic the inputs of the program over a 1 minute driver control period when the robot is flipped over to autonomous to use for the skills challenges. Is there any way to store this array into the flash storage of the cortex or do I need to physically type all of the changing values into the array every time I want to change the program?
Just have the program print it out using print line statements.
@tabor473 The purpose of writing it to flash storage was that it would save itself even when I turn off the robot and without me having to manually update the arrays.
Take a look at this.
and this thread. It is possible, but be very careful, there are many limitations.
https://vexforum.com/t/robotc-file-system/25007/1
I have not tested this for quite a while, it may or may not be compatible with ROBOTC V4.52.
How do the file read systems work? I am currently working at home without the robot, so I can’t test the read functions. Do I need to use an import command, is the data available, or is there a function that I haven’t found.
Download or clone the repo.
Open the demo project flashFileDemo.c in ROBOTC, that should be all you need to do to get started. As I said, this was an unofficial project from a couple of years ago and I have not tested it recently.
@jpearman Thanks! I think that I have the write/read system down. Do you know what happens if I run out of space in the flash storage? Is there a way to delete the files or write over them?
You have to use the File Management dialog in ROBOTC to delete files. No idea what happens if you run out of storage, this code was not really designed to write huge amounts of data. Try it out and perhaps it works, perhaps not, I will try and check with V4.52 tomorrow if there is time.