@@ -112,6 +112,9 @@ Successfully tested with Ubuntu 18.04-LTS+. Requires compiling your own PyGame t
112
112
- added MF64 LED-mode settings: brightness, toggling, flashing and animation settings
113
113
- updated MF64 LedCtrlRaw() to accept LED-mode settings
114
114
- updated MF64 LedAllOn() to optionally accept LED-mode settings
115
+ - updated MF64 LedCtrlXY() to optionally accept LED-mode settings
116
+ - added MF64 "constants" for easier LED-mode settings
117
+ - added MF64 LED-mode example file "midifighter_led_modes.py"
115
118
116
119
117
120
### CHANGES 2020/05/XX:
@@ -2272,6 +2275,28 @@ There is no possibility to control the RGB LEDs individually.
2272
2275
---
2273
2276
## Detailed description of Midi Fighter specific methods
2274
2277
2278
+ ### Constants
2279
+
2280
+ #### LED Modes
2281
+
2282
+ The following constants can be used instead of using integer values for the LED modes.
2283
+
2284
+ MODE_BRIGHT[0..15] instead of 18..33 for brightness
2285
+ MODE_TOGGLE[0..7] instead of 34..41 for toggling
2286
+ MODE_PULSE[0..7] instead of 42..49 for pulsing
2287
+ MODE_ANIM_SQUARE instead of 50
2288
+ MODE_ANIM_CIRCLE instead of 51
2289
+ MODE_ANIM_STAR instead of 52
2290
+ MODE_ANIM_TRIANGLE instead of 53
2291
+
2292
+ Some examples:
2293
+ lp.LedAllOn( 5, 18 ) becomes lp.LedAllOn( 5, lp.MODE_BRIGHT[0] ); LED RED BUT OFF
2294
+ lp.LedAllOn( 5, 33 ) becomes lp.LedAllOn( 5, lp.MODE_BRIGHT[15] ); LED RED FULLY ON
2295
+ lp.LedAllOn( 5, 33 ) becomes lp.LedAllOn( 5, lp.MODE_BRIGHT[15] ); LED RED FULLY ON
2296
+
2297
+ Accessing "out of bounds" list values will of course crash your app.
2298
+
2299
+
2275
2300
### ButtonStateRaw()
2276
2301
2277
2302
Returns the state of the buttons in RAW mode.
@@ -2318,6 +2343,17 @@ There is no possibility to control the RGB LEDs individually.
2318
2343
(*) This might be an error in the manual, as it does not contain an 1/4 setting
2319
2344
and starts at 1/32. Need to check ...
2320
2345
2346
+ As an alternative and instead of using the numbers above, these constants can be used.
2347
+ E.g. "LedAllOn( 5, lp.MODE_BRIGHT[5] )" for an intensity value of 5, from 0..15
2348
+
2349
+ MODE_BRIGHT[0..15]
2350
+ MODE_TOGGLE[0..7]
2351
+ MODE_PULSE[0..7]
2352
+ MODE_ANIM_SQUARE
2353
+ MODE_ANIM_CIRCLE
2354
+ MODE_ANIM_STAR
2355
+ MODE_ANIM_TRIANGLE
2356
+
2321
2357
PARAMS: <led> 36..99; number of the LED to control
2322
2358
<colorcode> 0..127; color code
2323
2359
<mode> [OPTIONAL] 18..53, see above
@@ -2341,6 +2377,17 @@ There is no possibility to control the RGB LEDs individually.
2341
2377
(*) This might be an error in the manual, as it does not contain an 1/4 setting
2342
2378
and starts at 1/32. Need to check ...
2343
2379
2380
+ As an alternative and instead of using the numbers above, these constants can be used.
2381
+ E.g. "LedAllOn( 5, lp.MODE_BRIGHT[5] )" for an intensity value of 5, from 0..15
2382
+
2383
+ MODE_BRIGHT[0..15]
2384
+ MODE_TOGGLE[0..7]
2385
+ MODE_PULSE[0..7]
2386
+ MODE_ANIM_SQUARE
2387
+ MODE_ANIM_CIRCLE
2388
+ MODE_ANIM_STAR
2389
+ MODE_ANIM_TRIANGLE
2390
+
2344
2391
PARAMS: <led> 36..99; number of the LED to control
2345
2392
<mode> 18..53; see above
2346
2393
RETURN:
@@ -2426,6 +2473,17 @@ There is no possibility to control the RGB LEDs individually.
2426
2473
(*) This might be an error in the manual, as it does not contain an 1/4 setting
2427
2474
and starts at 1/32. Need to check ...
2428
2475
2476
+ As an alternative and instead of using the numbers above, these constants can be used.
2477
+ E.g. "LedAllOn( 5, lp.MODE_BRIGHT[5] )" for an intensity value of 5, from 0..15
2478
+
2479
+ MODE_BRIGHT[0..15]
2480
+ MODE_TOGGLE[0..7]
2481
+ MODE_PULSE[0..7]
2482
+ MODE_ANIM_SQUARE
2483
+ MODE_ANIM_CIRCLE
2484
+ MODE_ANIM_STAR
2485
+ MODE_ANIM_TRIANGLE
2486
+
2429
2487
PARAMS: <colorcode> 0..127; color code
2430
2488
RETURN:
2431
2489
0 commit comments