@@ -66,6 +66,8 @@ public class WizardDevicesTxt extends JDialog {
66
66
private JLabel lblStartUniverse ;
67
67
private boolean doDisableStartUniverse = false ;
68
68
private boolean isPixelPusher = false ;
69
+ private int universeStart ;
70
+ private int universes ;
69
71
70
72
private JLabel lblPort1 ;
71
73
private JLabel lblPort2 ;
@@ -659,8 +661,7 @@ private void update() {
659
661
}
660
662
661
663
final int groups = count / (int ) formattedTextFieldGroupSize .getValue ();
662
- int universeStart = (int ) formattedTextFieldStartUniverse .getValue ();
663
- int universes ;
664
+ universeStart = (int ) formattedTextFieldStartUniverse .getValue ();
664
665
665
666
if (doDisableStartUniverse ) {
666
667
universeStart = groups ;
@@ -789,28 +790,64 @@ private void save() {
789
790
txtFile .append (String .format ("led_rgb_mapping=%s\n " , mapping ));
790
791
}
791
792
792
- txtFile .append (String .format ("active_out=%d\n " , (int ) spinnerActiveOutput .getValue ()));
793
+ final int outputs = (int ) spinnerActiveOutput .getValue ();
794
+ txtFile .append (String .format ("active_out=%d\n " , outputs ));
793
795
794
796
if (!doDisableStartUniverse ) {
795
- txtFile .append (String .format ("start_uni_port_1=%s\n " , lblUniversePort1 .getText ()));
796
- if ((int ) spinnerActiveOutput .getValue () > 1 ) {
797
- txtFile .append (String .format ("start_uni_port_2=%s\n " , lblUniversePort2 .getText ()));
798
- txtFile .append (String .format ("start_uni_port_3=%s\n " , lblUniversePort3 .getText ()));
799
- txtFile .append (String .format ("start_uni_port_4=%s\n " , lblUniversePort4 .getText ()));
800
- txtFile .append (String .format ("start_uni_port_5=%s\n " , lblUniversePort5 .getText ()));
801
- txtFile .append (String .format ("start_uni_port_6=%s\n " , lblUniversePort6 .getText ()));
802
- txtFile .append (String .format ("start_uni_port_7=%s\n " , lblUniversePort7 .getText ()));
803
- txtFile .append (String .format ("start_uni_port_8=%s\n " , lblUniversePort8 .getText ()));
797
+ txtFile .append (String .format ("start_uni_port_1=%s\n " , universeStart ));
798
+ int universeStartNext = universeStart ;
799
+
800
+ if (outputs >= 2 ) {
801
+ universeStartNext += universes ;
802
+ txtFile .append (String .format ("start_uni_port_2=%s\n " , universeStartNext ));
803
+ }
804
+ if (outputs >= 3 ) {
805
+ universeStartNext += universes ;
806
+ txtFile .append (String .format ("start_uni_port_3=%s\n " , universeStartNext ));
807
+ }
808
+ if (outputs >= 4 ) {
809
+ universeStartNext += universes ;
810
+ txtFile .append (String .format ("start_uni_port_4=%s\n " , universeStartNext ));
811
+ }
812
+ if (outputs >= 5 ) {
813
+ universeStartNext += universes ;
814
+ txtFile .append (String .format ("start_uni_port_5=%s\n " , universeStartNext ));
815
+ }
816
+ if (outputs >= 6 ) {
817
+ universeStartNext += universes ;
818
+ txtFile .append (String .format ("start_uni_port_6=%s\n " , universeStartNext ));
819
+ }
820
+ if (outputs >= 7 ) {
821
+ universeStartNext += universes ;
822
+ txtFile .append (String .format ("start_uni_port_7=%s\n " , universeStartNext ));
823
+ }
824
+ if (outputs >= 8 ) {
825
+ universeStartNext += universes ;
826
+ txtFile .append (String .format ("start_uni_port_8=%s\n " , universeStartNext ));
827
+ }
828
+ if (outputs >= 9 ) {
829
+ txtFile .append (String .format ("start_uni_port_9=%s\n " , universeStartNext ));
830
+ }
831
+ if (outputs >= 10 ) {
832
+ txtFile .append (String .format ("start_uni_port_10=%s\n " , universeStartNext ));
833
+ }
834
+ if (outputs >= 11 ) {
835
+ txtFile .append (String .format ("start_uni_port_11=%s\n " , universeStartNext ));
836
+ }
837
+ if (outputs >= 12 ) {
838
+ txtFile .append (String .format ("start_uni_port_12=%s\n " , universeStartNext ));
839
+ }
840
+ if (outputs >= 13 ) {
841
+ txtFile .append (String .format ("start_uni_port_13=%s\n " , universeStartNext ));
842
+ }
843
+ if (outputs >= 14 ) {
844
+ txtFile .append (String .format ("start_uni_port_14=%s\n " , universeStartNext ));
845
+ }
846
+ if (outputs >= 15 ) {
847
+ txtFile .append (String .format ("start_uni_port_15=%s\n " , universeStartNext ));
804
848
}
805
- if ((int ) spinnerActiveOutput .getValue () > 8 ) {
806
- txtFile .append (String .format ("start_uni_port_9=%s\n " , lblUniversePort9 .getText ()));
807
- txtFile .append (String .format ("start_uni_port_10=%s\n " , lblUniversePort10 .getText ()));
808
- txtFile .append (String .format ("start_uni_port_11=%s\n " , lblUniversePort11 .getText ()));
809
- txtFile .append (String .format ("start_uni_port_12=%s\n " , lblUniversePort12 .getText ()));
810
- txtFile .append (String .format ("start_uni_port_13=%s\n " , lblUniversePort13 .getText ()));
811
- txtFile .append (String .format ("start_uni_port_14=%s\n " , lblUniversePort14 .getText ()));
812
- txtFile .append (String .format ("start_uni_port_15=%s\n " , lblUniversePort15 .getText ()));
813
- txtFile .append (String .format ("start_uni_port_16=%s\n " , lblUniversePort16 .getText ()));
849
+ if (outputs == 16 ) {
850
+ txtFile .append (String .format ("start_uni_port_16=%s\n " , universeStartNext ));
814
851
}
815
852
}
816
853
0 commit comments