spuder / All-Spark-Cube

Software to control an RGB led cube
20 stars 6 forks source link

File format saves all 4096 characters #63

Closed iannate closed 11 years ago

iannate commented 12 years ago

The current save format saves all blank values. The format needs to just save changes to those formats, so that we don't use up all bandwidth sending the same values over each frame. For instance, a 30 frame animation sending the acronym GPGPU across the cube sidways was only about 4500 lines long.

Frame 0, if empty, will contain no values. Frame 1, Row 1, Col 1, would contain "4" in color to switch it on. Frame 2, Row 1, Col 1 would contain "0" if switching it off again.

To differentiate between frames in the animation (since they automatically cycle through), a value of X (milliseconds) needs to be entered into the "timeout" column - just on the LAST value of the frame. I.E. - if you were drawing a small 3 pixel white line, the values would look like:

(Line Number, Command, Label, Panel, Row, Column, Color, Options, timeout)

1, 11, , 1, 1, 1, 4, 0, 0 2, 11, , 1, 2, 1, 4, 0, 0 3, 11, , 1, 3, 1, 4, 0, 250 4, 11, , 1, 1, 1, 8, 0, 0 5, 11, , 1, 2, 1, 8, 0, 0 6, 11, , 1, 3, 1, 8, 0, 250

I'm fine using a value such as 250 for the default (which would be 1/4 second or so). I can always go back and change it - and depending on the animation, it may be too fast / slow anyway.

What I think we'll do is have each of the animation files be seperate, then have them toggled from a master file, which is already built into the functionality of the Protocol Analyzer.

spuder commented 11 years ago

This has been implimented with limitations. There are extra string 'null's at the end of the file. They must manually be removed with excel. Data in these new columns will be lost on import. That aspect will not change since it requires significant re archecture. All colums not part of origional specification will export a 0. They must mannually be changed to 250 or whatever the cube expects.