Simple single-color 8x8x8 LED Cube with AVRs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cubeWorker.java 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. public class cubeWorker {
  2. cubeWorker() {
  3. }
  4. // Adds a new Animation
  5. // Returns id if ok, -1 if error or not enough space for
  6. // another animation
  7. public int addAnimation() {
  8. return -1;
  9. }
  10. // Removes an animation
  11. public void removeAnimation(int index) {
  12. }
  13. // Returns how many animations are defined
  14. public int numOfAnimations() {
  15. return 0;
  16. }
  17. // Selects an animation, on wich the frame specific functions operate
  18. // Returns -1 if it does not exist
  19. public int selectAnimation(int index) {
  20. return -1;
  21. }
  22. public String getAnimationName(int index) {
  23. return "Test";
  24. }
  25. public void setAnimationName(int index, String s) {
  26. }
  27. // Returns how many frames are in the current animation
  28. public int numOfFrames() {
  29. return 0;
  30. }
  31. public String getFrameName(int index) {
  32. return "Test";
  33. }
  34. public void setFrameName(int index, String s) {
  35. }
  36. // Adds a Frame to the current animation.
  37. // Returns id if okay, -1 if error
  38. public int addFrame() {
  39. return -1;
  40. }
  41. // Remove a frame
  42. public void removeFrame(int index) {
  43. }
  44. // Returns array with 64 bytes with led values
  45. public byte[] getFrame(int index) {
  46. return null;
  47. }
  48. public void setFrame(int index, byte[] data) {
  49. }
  50. // Loads an animation file into this object
  51. public int loadState(String path) {
  52. return 0;
  53. }
  54. // Saves the state of this object in an animation file
  55. public int saveState(String path) {
  56. System.out.println("Saving to " + path);
  57. return 0;
  58. }
  59. // sends state of object to led cube
  60. public int uploadState(String port) {
  61. return 0;
  62. }
  63. // loads all state from the cube into this object
  64. public int downloadState(String port) {
  65. return 0;
  66. }
  67. // Tells how many Frames you can add until you reached 1 Mbit...
  68. public int framesRemaining() {
  69. return 0;
  70. }
  71. public String[] getSerialPorts() {
  72. return null;
  73. }
  74. // Returns true if last saved state != current state
  75. public boolean changedStateSinceSave() {
  76. return false;
  77. }
  78. }