@@ -106,11 +106,8 @@ public String toString() {
106106 private JTextField GearRatio ;
107107 private JTextField txtMaxregencurrent ;
108108
109- private JTextField CellsNumber ;
110109 private JTextField PAS_threshold ;
111110 private JTextField txtMaxphasecurrent ;
112- private JTextField TempCalA ;
113- private JTextField TempCalB ;
114111 private JRadioButton rdbtnBluOsecDisplay ;
115112
116113 private JRadioButton rdbtnKingmeterJlcd ;
@@ -190,8 +187,8 @@ public void loadSettings(File f) throws IOException {
190187 txtMaxregencurrent .setText (in .readLine ());
191188 txtMotor_specific_angle .setText (in .readLine ());
192189 txtBatteryCurcala .setText (in .readLine ());
193- TempCalA . setText ( in .readLine () );
194- TempCalB . setText ( in .readLine () );
190+ in .readLine ();
191+ in .readLine ();
195192 Assist_Level_1 .setText (in .readLine ());
196193 Assist_Level_2 .setText (in .readLine ());
197194 Assist_Level_3 .setText (in .readLine ());
@@ -204,7 +201,7 @@ public void loadSettings(File f) throws IOException {
204201 p_factor .setText (in .readLine ());
205202 i_factor .setText (in .readLine ());
206203 GearRatio .setText (in .readLine ());
207- CellsNumber . setText ( in .readLine () );
204+ in .readLine ();
208205 PAS_threshold .setText (in .readLine ());
209206
210207 cbTorqueSensor .setSelected (Boolean .parseBoolean (in .readLine ()));
@@ -545,26 +542,39 @@ public void mouseClicked(MouseEvent e) {
545542 GearRatio .setColumns (10 );
546543 GearRatio .setBounds (150 , 270 , 86 , 20 );
547544 contentPane .add (GearRatio );
545+
546+ JLabel lblUndervoltageLimit = new JLabel ("Undervoltage" );
547+ lblUndervoltageLimit .setBounds (15 , 290 , 121 , 14 );
548+ lblUndervoltageLimit .setForeground (Color .GRAY );
549+ contentPane .add (lblUndervoltageLimit );
548550
549- JLabel lblTemperatureCalA = new JLabel ("Temperature cal a" );
550- lblTemperatureCalA .setBounds (15 , 310 , 121 , 14 );
551- contentPane .add (lblTemperatureCalA );
551+ txtUndervoltage = new JTextField ();
552+ txtUndervoltage .setText ("127" );
553+ txtUndervoltage .setBounds (150 , 290 , 86 , 20 );
554+ contentPane .add (txtUndervoltage );
555+ txtUndervoltage .setColumns (3 );
552556
553- TempCalA = new JTextField ();
554- TempCalA .setText ("1.6" );
555- TempCalA .setColumns (10 );
556- TempCalA .setBounds (150 , 310 , 86 , 20 );
557- contentPane .add (TempCalA );
557+ JLabel lblOvervoltageLimit = new JLabel ("Overvoltage" );
558+ lblOvervoltageLimit .setBounds (15 , 310 , 121 , 14 );
559+ lblOvervoltageLimit .setForeground (Color .GRAY );
560+ contentPane .add (lblOvervoltageLimit );
558561
559- JLabel lblTemperatureCalB = new JLabel ("Temperature cal b" );
560- lblTemperatureCalB .setBounds (15 , 330 , 121 , 14 );
561- contentPane .add (lblTemperatureCalB );
562+ txtOvervoltage = new JTextField ();
563+ txtOvervoltage .setText ("150" );
564+ txtOvervoltage .setBounds (150 , 310 , 86 , 20 );
565+ contentPane .add (txtOvervoltage );
566+ txtOvervoltage .setColumns (3 );
567+
568+ JLabel lblBatVolCal = new JLabel ("Voltage Calibration" );
569+ lblBatVolCal .setBounds (15 , 330 , 121 , 14 );
570+ lblBatVolCal .setForeground (Color .GRAY );
571+ contentPane .add (lblBatVolCal );
562572
563- TempCalB = new JTextField ();
564- TempCalB .setText ("110.4 " );
565- TempCalB .setColumns (10 );
566- TempCalB .setBounds (150 , 330 , 86 , 20 );
567- contentPane .add (TempCalB );
573+ batteryVoltageCalib = new JTextField ();
574+ batteryVoltageCalib .setText ("70 " );
575+ batteryVoltageCalib .setColumns (2 );
576+ batteryVoltageCalib .setBounds (150 , 330 , 86 , 20 );
577+ contentPane .add (batteryVoltageCalib );
568578
569579 JLabel lblPfactor = new JLabel ("Gain P" );
570580 lblPfactor .setBounds (15 , 350 , 67 , 14 );
@@ -743,49 +753,6 @@ public void mouseClicked(MouseEvent e) {
743753 contentPane .add (txtMotor_specific_angle );
744754 txtMotor_specific_angle .setColumns (10 );
745755
746- JLabel lblUndervoltageLimit = new JLabel ("Undervoltage" );
747- lblUndervoltageLimit .setBounds (415 , 270 , 121 , 14 );
748- lblUndervoltageLimit .setForeground (Color .GRAY );
749- contentPane .add (lblUndervoltageLimit );
750-
751- txtUndervoltage = new JTextField ();
752- txtUndervoltage .setText ("127" );
753- txtUndervoltage .setBounds (530 , 270 , 50 , 20 );
754- contentPane .add (txtUndervoltage );
755- txtUndervoltage .setColumns (3 );
756-
757- JLabel lblNumberSerialCells = new JLabel ("# Cells" );
758- lblNumberSerialCells .setBounds (415 , 290 , 121 , 14 );
759- contentPane .add (lblNumberSerialCells );
760-
761- CellsNumber = new JTextField ();
762- CellsNumber .setText ("10" );
763- CellsNumber .setColumns (10 );
764- CellsNumber .setBounds (530 , 290 , 50 , 20 );
765- contentPane .add (CellsNumber );
766-
767- JLabel lblOvervoltageLimit = new JLabel ("Overvoltage" );
768- lblOvervoltageLimit .setBounds (415 , 310 , 121 , 14 );
769- lblOvervoltageLimit .setForeground (Color .GRAY );
770- contentPane .add (lblOvervoltageLimit );
771-
772- txtOvervoltage = new JTextField ();
773- txtOvervoltage .setText ("150" );
774- txtOvervoltage .setBounds (530 , 310 , 50 , 20 );
775- contentPane .add (txtOvervoltage );
776- txtOvervoltage .setColumns (3 );
777-
778- JLabel lblBatVolCal = new JLabel ("Volt Calib" );
779- lblBatVolCal .setBounds (415 , 330 , 121 , 14 );
780- lblBatVolCal .setForeground (Color .GRAY );
781- contentPane .add (lblBatVolCal );
782-
783- batteryVoltageCalib = new JTextField ();
784- batteryVoltageCalib .setText ("70" );
785- batteryVoltageCalib .setColumns (2 );
786- batteryVoltageCalib .setBounds (530 , 330 , 50 , 20 );
787- contentPane .add (batteryVoltageCalib );
788-
789756 JList list = new JList ();
790757 list .setBounds (441 , 177 , 1 , 1 );
791758 contentPane .add (list );
@@ -884,35 +851,35 @@ public void actionPerformed(ActionEvent arg0) {
884851 contentPane .add (ramp_start );
885852
886853 lblSpeedLimit = new JLabel ("Limit (km/h)" );
887- lblSpeedLimit .setBounds (250 , 340 , 80 , 14 );
854+ lblSpeedLimit .setBounds (250 , 350 , 80 , 14 );
888855 lblSpeedLimit .setForeground (Color .GRAY );
889856 contentPane .add (lblSpeedLimit );
890857
891858 txtSpeedlimit = new JTextField ();
892859 txtSpeedlimit .setText ("25" );
893- txtSpeedlimit .setBounds (350 , 340 , 50 , 20 );
860+ txtSpeedlimit .setBounds (350 , 350 , 50 , 20 );
894861 contentPane .add (txtSpeedlimit );
895862 txtSpeedlimit .setColumns (10 );
896863
897864 JLabel lblSpeedLimitwopas = new JLabel ("Without PAS" );
898- lblSpeedLimitwopas .setBounds (250 , 360 , 80 , 14 );
865+ lblSpeedLimitwopas .setBounds (250 , 370 , 80 , 14 );
899866 lblSpeedLimitwopas .setForeground (Color .GRAY );
900867 contentPane .add (lblSpeedLimitwopas );
901868
902869 txtSpeedlimitWithoutPas = new JTextField ();
903870 txtSpeedlimitWithoutPas .setText ("6" );
904- txtSpeedlimitWithoutPas .setBounds (350 , 360 , 50 , 20 );
871+ txtSpeedlimitWithoutPas .setBounds (350 , 370 , 50 , 20 );
905872 contentPane .add (txtSpeedlimitWithoutPas );
906873 txtSpeedlimitWithoutPas .setColumns (10 );
907874
908875 JLabel lblSpeedLimitwto = new JLabel ("Offroad" );
909- lblSpeedLimitwto .setBounds (250 , 380 , 80 , 14 );
876+ lblSpeedLimitwto .setBounds (250 , 390 , 80 , 14 );
910877 lblSpeedLimitwto .setForeground (Color .GRAY );
911878 contentPane .add (lblSpeedLimitwto );
912879
913880 txtSpeedlimitWithThrottleOverride = new JTextField ();
914881 txtSpeedlimitWithThrottleOverride .setText ("25" );
915- txtSpeedlimitWithThrottleOverride .setBounds (350 , 380 , 50 , 20 );
882+ txtSpeedlimitWithThrottleOverride .setBounds (350 , 390 , 50 , 20 );
916883 contentPane .add (txtSpeedlimitWithThrottleOverride );
917884 txtSpeedlimitWithThrottleOverride .setColumns (10 );
918885
@@ -1200,13 +1167,8 @@ public void actionPerformed(ActionEvent arg0) {
12001167 iWriter .println (txtBatteryCurcala .getText ());
12011168 pWriter .println (text_to_save );
12021169
1203- text_to_save = "#define TEMP_CAL_A " + TempCalA .getText ();
1204- iWriter .println (TempCalA .getText ());
1205- pWriter .println (text_to_save );
1206-
1207- text_to_save = "#define TEMP_CAL_B " + TempCalB .getText ();
1208- iWriter .println (TempCalB .getText ());
1209- pWriter .println (text_to_save );
1170+ iWriter .println ("" );
1171+ iWriter .println ("" );
12101172
12111173 text_to_save = "#define LEVEL_1 " + Assist_Level_1 .getText ();
12121174 iWriter .println (Assist_Level_1 .getText ());
@@ -1256,9 +1218,7 @@ public void actionPerformed(ActionEvent arg0) {
12561218 iWriter .println (GearRatio .getText ());
12571219 pWriter .println (text_to_save );
12581220
1259- text_to_save = "#define BATTERY_LI_ION_CELLS_NUMBER " + CellsNumber .getText ();
1260- iWriter .println (CellsNumber .getText ());
1261- pWriter .println (text_to_save );
1221+ iWriter .println ("" );
12621222
12631223 text_to_save = "#define PAS_THRESHOLD " + PAS_threshold .getText ();
12641224 iWriter .println (PAS_threshold .getText ());
0 commit comments