|
34 | 34 | # Drop to cli, type exit in the displayed terminal to continue |
35 | 35 | #i.control.cli() |
36 | 36 |
|
| 37 | +print("-Pixel Test-") |
| 38 | + |
37 | 39 | # Read status of animation display buffers |
38 | | -print( i.control.cmd('animationDisplayBuffers')() ) |
| 40 | +#print( i.control.cmd('animationDisplayBuffers')() ) |
39 | 41 |
|
40 | 42 | # Add Animation, index 0, to Stack |
41 | 43 | i.control.cmd('addAnimation')() |
|
51 | 53 | expecting = ((0, 33, 49), (30, 70, 120)) |
52 | 54 | print( "Expecting:", expecting, "Got:", i.control.cmd('readPixel')(0) ) |
53 | 55 | check( i.control.cmd('readPixel')(0) == expecting ) |
| 56 | +i.control.cmd('rectDisp')() |
54 | 57 |
|
55 | 58 | # Update FrameState and Loop again |
56 | 59 | i.control.cmd('setFrameState')(2) |
|
60 | 63 | expecting = ((0, 33, 49), (0, 0, 0)) |
61 | 64 | print( "Expecting:", expecting, "Got:", i.control.cmd('readPixel')(0) ) |
62 | 65 | check( i.control.cmd('readPixel')(0) == expecting ) |
| 66 | +i.control.cmd('rectDisp')() |
63 | 67 |
|
64 | 68 | # Update FrameState and Loop again |
65 | 69 | i.control.cmd('setFrameState')(2) |
|
69 | 73 | expecting = ((0, 33, 49), (60, 90, 140)) |
70 | 74 | print( "Expecting:", expecting, "Got:", i.control.cmd('readPixel')(0) ) |
71 | 75 | check( i.control.cmd('readPixel')(0) == expecting ) |
| 76 | +i.control.cmd('rectDisp')() |
72 | 77 |
|
73 | 78 | # Update FrameState and Loop again to clear the stack |
74 | 79 | i.control.cmd('setFrameState')(2) |
75 | 80 | i.control.loop(1) |
76 | 81 |
|
77 | 82 | # Read status of animation display buffers |
78 | | -print( i.control.cmd('animationDisplayBuffers')() ) |
| 83 | +#print( i.control.cmd('animationDisplayBuffers')() ) |
79 | 84 |
|
80 | 85 | # Read animation stack info |
81 | 86 | print( "Expecting Stack Size: 0 Got:", i.control.cmd('animationStackInfo')().size ) |
82 | 87 | check( i.control.cmd('animationStackInfo')().size == 0 ) |
83 | 88 |
|
| 89 | + |
| 90 | +##### Next Test ##### |
| 91 | + |
| 92 | + |
| 93 | +print("-Rainbow Test-") |
| 94 | +# Add Animation, index 0, to Stack |
| 95 | +i.control.cmd('addAnimation')(index=1, pfunc=0) |
| 96 | + |
| 97 | +# Read animation stack info |
| 98 | +print( "Expecting Stack Size: 1 Got:", i.control.cmd('animationStackInfo')().size ) |
| 99 | +check( i.control.cmd('animationStackInfo')().size == 1 ) |
| 100 | + |
| 101 | +# Loop once |
| 102 | +i.control.cmd('setFrameState')(2) |
| 103 | +i.control.loop(1) |
| 104 | + |
| 105 | +# Show output |
| 106 | +i.control.cmd('rectDisp')() |
| 107 | + |
| 108 | +# Update FrameState and Loop again to clear the stack |
| 109 | +i.control.cmd('setFrameState')(2) |
| 110 | +i.control.loop(1) |
| 111 | + |
| 112 | +# Read animation stack info |
| 113 | +print( "Expecting Stack Size: 0 Got:", i.control.cmd('animationStackInfo')().size ) |
| 114 | +check( i.control.cmd('animationStackInfo')().size == 0 ) |
| 115 | + |
| 116 | + |
| 117 | +##### Tests Complete ##### |
| 118 | + |
84 | 119 | result() |
85 | 120 |
|
0 commit comments