Closed spuder closed 12 years ago
Currently saves just the led value if true (0-0-0).
Still need to test that unchecking led actually removes it.
Changed from Hashmap to tree map to get additional sorting. Needs benchmarks since tree maps are slower
We should save the text files with the timestamp so they can be easily sorted.
I agree. We should also be able to choose the file that we save to.
I think this one is pretty much done as well. Will need to tweak it depending on the final csv file layout and then update it when we switch to json.
right now it exports to a file in the following format "absolute_location color/off" For example "2098 red" or "3456 off". It also lets you pick a file on export and import. We will have to switch to JSON for more features later.
There are several options for outputting the state of all leds
An example would be such as
csv: Led# red green blue brightness 0-0-0 255 255 255 75
json: 000 - "{255,255,255,75}"
The best is either json or tsv. xml is popular but results in files much larger than they need to be. The main reason to use a xml is to show relationships. The led cube has relationships but the advantages of showing them is outweighed by the difficulty of parsing xml. This file will be sent to the interpreter. If the interpreter is on the computer, the file type will not matter. If the interpreter is on the arduino, the fastest and easiest to transport over serial/networking method should be used.
Research and implement in sandbox, saving the status of objects to a file
Research the following: QCJson, FileInputStream, FileOutputStream, JSONUtilities.stringify
Ask spencer for his book on java serialization.