@@ -347,107 +347,81 @@ void BMCEditor::globalBuildInfoMessage(){// BMC_GLOBALF_BUILD_INFO
347
347
buff.appendToSysEx7Bits (BMCBuildData::getGlobalEncoderPinB (i));
348
348
}
349
349
#endif
350
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS ||
351
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_2 ||
352
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_3 ||
353
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_4
350
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS ||
351
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_2 ||
352
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_3 ||
353
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_4
354
354
){
355
355
uint8_t min = 0 ;
356
356
uint8_t max = 32 ;
357
- if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_2 ){
357
+ if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_2 ){
358
358
min = 32 ;
359
359
max = 64 ;
360
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_3 ){
360
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_3 ){
361
361
min = 64 ;
362
362
max = 96 ;
363
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_4 ){
363
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_4 ){
364
364
min = 96 ;
365
365
max = 128 ;
366
366
}
367
+
367
368
// pot pins
368
- buff.appendToSysEx8Bits (BMC_MAX_GLOBAL_POTS );
369
+ buff.appendToSysEx8Bits (BMC_MAX_POTS );
369
370
uint8_t numOfPinsInMessage = 0 ;
370
371
for (uint8_t i=min;i<max;i++){
371
- if (i<BMC_MAX_GLOBAL_POTS ){
372
+ if (i<BMC_MAX_POTS ){
372
373
numOfPinsInMessage++;
373
374
continue ;
374
375
}
375
376
break ;
376
377
}
377
378
buff.appendToSysEx7Bits (numOfPinsInMessage);
378
- #if BMC_MAX_GLOBAL_POTS > 0
379
+ #if BMC_MAX_POTS > 0
379
380
for (uint8_t i=min;i<max;i++){
380
- if (i<BMC_MAX_GLOBAL_POTS){
381
- buff.appendToSysEx8Bits (BMCBuildData::getGlobalPotPin (i));
382
- } else {
383
- break ;
384
- }
385
- }
386
- #endif
387
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_2){
388
- // pot pins
389
- buff.appendToSysEx8Bits (BMC_MAX_GLOBAL_POTS);
390
- uint8_t numOfPinsInMessage = 0 ;
391
- for (uint8_t i=32 ;i<64 ;i++){
392
- if (i<BMC_MAX_GLOBAL_POTS){
393
- numOfPinsInMessage++;
394
- continue ;
395
- }
396
- break ;
397
- }
398
- buff.appendToSysEx7Bits (numOfPinsInMessage);
399
- #if BMC_MAX_GLOBAL_POTS > 32
400
- for (uint8_t i=32 ;i<64 ;i++){
401
- if (i<BMC_MAX_GLOBAL_POTS){
402
- buff.appendToSysEx8Bits (BMCBuildData::getGlobalPotPin (i));
381
+ if (i<BMC_MAX_POTS){
382
+ buff.appendToSysEx8Bits (BMCBuildData::getPotPin (i));
403
383
} else {
404
384
break ;
405
385
}
406
386
}
407
387
#endif
408
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_3){
409
- // pot pins
410
- buff.appendToSysEx8Bits (BMC_MAX_GLOBAL_POTS);
411
- uint8_t numOfPinsInMessage = 0 ;
412
- for (uint8_t i=64 ;i<96 ;i++){
413
- if (i<BMC_MAX_GLOBAL_POTS){
414
- numOfPinsInMessage++;
415
- continue ;
416
- }
417
- break ;
388
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS ||
389
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_2 ||
390
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_3 ||
391
+ itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_4
392
+ ){
393
+ uint8_t min = 0 ;
394
+ uint8_t max = 32 ;
395
+ if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_2){
396
+ min = 32 ;
397
+ max = 64 ;
398
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_3){
399
+ min = 64 ;
400
+ max = 96 ;
401
+ } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_4){
402
+ min = 96 ;
403
+ max = 128 ;
418
404
}
419
- buff.appendToSysEx7Bits (numOfPinsInMessage);
420
- #if BMC_MAX_GLOBAL_POTS > 64
421
- for (uint8_t i=64 ;i<96 ;i++){
422
- if (i<BMC_MAX_GLOBAL_POTS){
423
- buff.appendToSysEx8Bits (BMCBuildData::getGlobalPotPin (i));
424
- } else {
425
- break ;
426
- }
427
- }
428
- #endif
429
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_GLOBAL_POTS_4){
430
405
// pot pins
431
406
buff.appendToSysEx8Bits (BMC_MAX_GLOBAL_POTS);
432
407
uint8_t numOfPinsInMessage = 0 ;
433
- for (uint8_t i=96 ;i<BMC_MAX_GLOBAL_POTS ;i++){
408
+ for (uint8_t i=min ;i<max ;i++){
434
409
if (i<BMC_MAX_GLOBAL_POTS){
435
410
numOfPinsInMessage++;
436
411
continue ;
437
412
}
438
413
break ;
439
414
}
440
415
buff.appendToSysEx7Bits (numOfPinsInMessage);
441
- #if BMC_MAX_GLOBAL_POTS > 96
442
- for (uint8_t i=96 ;i<BMC_MAX_GLOBAL_POTS ;i++){
416
+ #if BMC_MAX_GLOBAL_POTS > 0
417
+ for (uint8_t i=min ;i<max ;i++){
443
418
if (i<BMC_MAX_GLOBAL_POTS){
444
419
buff.appendToSysEx8Bits (BMCBuildData::getGlobalPotPin (i));
445
420
} else {
446
421
break ;
447
422
}
448
423
}
449
424
#endif
450
- */
451
425
} else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_LEDS){
452
426
// led pins
453
427
buff.appendToSysEx8Bits (BMC_MAX_LEDS);
@@ -464,108 +438,6 @@ void BMCEditor::globalBuildInfoMessage(){// BMC_GLOBALF_BUILD_INFO
464
438
buff.appendToSysEx7Bits (BMCBuildData::getPwmLedPin (i));
465
439
}
466
440
#endif
467
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS ||
468
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_2 ||
469
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_3 ||
470
- itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_4
471
- ){
472
- uint8_t min = 0 ;
473
- uint8_t max = 32 ;
474
- if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_2){
475
- min = 32 ;
476
- max = 64 ;
477
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_3){
478
- min = 64 ;
479
- max = 96 ;
480
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_4){
481
- min = 96 ;
482
- max = 128 ;
483
- }
484
-
485
- // pot pins
486
- buff.appendToSysEx8Bits (BMC_MAX_POTS);
487
- uint8_t numOfPinsInMessage = 0 ;
488
- for (uint8_t i=min;i<max;i++){
489
- if (i<BMC_MAX_POTS){
490
- numOfPinsInMessage++;
491
- continue ;
492
- }
493
- break ;
494
- }
495
- buff.appendToSysEx7Bits (numOfPinsInMessage);
496
- #if BMC_MAX_POTS > 0
497
- for (uint8_t i=min;i<max;i++){
498
- if (i<BMC_MAX_POTS){
499
- buff.appendToSysEx8Bits (BMCBuildData::getPotPin (i));
500
- } else {
501
- break ;
502
- }
503
- }
504
- #endif
505
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_2){
506
- // pot pins
507
- buff.appendToSysEx8Bits (BMC_MAX_POTS);
508
- uint8_t numOfPinsInMessage = 0 ;
509
- for (uint8_t i=32 ;i<64 ;i++){
510
- if (i<BMC_MAX_POTS){
511
- numOfPinsInMessage++;
512
- continue ;
513
- }
514
- break ;
515
- }
516
- buff.appendToSysEx7Bits (numOfPinsInMessage);
517
- #if BMC_MAX_POTS > 32
518
- for (uint8_t i=32 ;i<64 ;i++){
519
- if (i<BMC_MAX_POTS){
520
- buff.appendToSysEx8Bits (BMCBuildData::getPotPin (i));
521
- } else {
522
- break ;
523
- }
524
- }
525
- #endif
526
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_3){
527
- // pot pins
528
- buff.appendToSysEx8Bits (BMC_MAX_POTS);
529
- uint8_t numOfPinsInMessage = 0 ;
530
- for (uint8_t i=64 ;i<96 ;i++){
531
- if (i<BMC_MAX_POTS){
532
- numOfPinsInMessage++;
533
- continue ;
534
- }
535
- break ;
536
- }
537
- buff.appendToSysEx7Bits (numOfPinsInMessage);
538
- #if BMC_MAX_POTS > 64
539
- for (uint8_t i=64 ;i<96 ;i++){
540
- if (i<BMC_MAX_POTS){
541
- buff.appendToSysEx8Bits (BMCBuildData::getPotPin (i));
542
- } else {
543
- break ;
544
- }
545
- }
546
- #endif
547
- } else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_POTS_4){
548
- // pot pins
549
- buff.appendToSysEx8Bits (BMC_MAX_POTS);
550
- uint8_t numOfPinsInMessage = 0 ;
551
- for (uint8_t i=96 ;i<BMC_MAX_POTS;i++){
552
- if (i<BMC_MAX_POTS){
553
- numOfPinsInMessage++;
554
- continue ;
555
- }
556
- break ;
557
- }
558
- buff.appendToSysEx7Bits (numOfPinsInMessage);
559
- #if BMC_MAX_POTS > 64
560
- for (uint8_t i=96 ;i<BMC_MAX_POTS;i++){
561
- if (i<BMC_MAX_POTS){
562
- buff.appendToSysEx8Bits (BMCBuildData::getPotPin (i));
563
- } else {
564
- break ;
565
- }
566
- }
567
- #endif
568
- */
569
441
} else if (itemId==BMC_GLOBALF_BUILD_INFO_PINS_ENCODERS){
570
442
// encoder pins
571
443
buff.appendToSysEx8Bits (BMC_MAX_ENCODERS);
0 commit comments