El problema es que estas definiendo los mismos nombres de variables dentro del método onCreate()
por lo tanto únicamente tendrán valor dentro de este método.
Usa las variables que defines en la clase:
public class UsbSettingActivity extends AppCompatPreferenceActivity {
final String setBaudRate = "" ;
public static String mconfigbaudrate = "";
public static String mconfigdatabit = "";
public static String mconfigbitstop = "";
public static String mconfigparity = "";
public static String mconfigfontsize = "";
public static String mconfigconsolamode = "";
public static String mconfigfindelinea = "";
public static String mconfigenableeco = "";
public static String mconfigfilesave = "";
...
...
Realiza el cambio para que las variables puedas ser enviadas con su respectivo valor vía intent
:
public void onCreate(final Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_setup_com);
setHasOptionsMenu( true );
bindPreferenceSummaryToValue( findPreference( "config_baud_rate" ) );
bindPreferenceSummaryToValue( findPreference( "config_data_bit" ) );
bindPreferenceSummaryToValue( findPreference( "config_bit_stop" ) );
bindPreferenceSummaryToValue( findPreference( "config_parity" ) );
bindPreferenceSummaryToValue( findPreference( "config_flow_control" ) );
bindPreferenceSummaryToValue( findPreference( "config_font_size" ) );
bindPreferenceSummaryToValue( findPreference( "config_consola_mode" ) );
bindPreferenceSummaryToValue( findPreference( "config_fin_delinea" ) );
bindPreferenceSummaryToValue( findPreference( "config_filesave" ) );
ListPreference SPconfigbaudrate2 = (ListPreference) findPreference("config_baud_rate");
mconfigbaudrate = SPconfigbaudrate2.getValue();
ListPreference SPconfigdatabit2 = (ListPreference) findPreference("config_data_bit");
//String mconfigdatabit = SPconfigdatabit2.getValue(); mconfigdatabit = SPconfigdatabit2.getValue();
ListPreference SPconfigbitstop2 = (ListPreference) findPreference("config_bit_stop");
//String mconfigbitstop = SPconfigbitstop2.getValue();
mconfigbitstop = SPconfigbitstop2.getValue();
ListPreference SPmconfigparity2 = (ListPreference) findPreference("config_parity");
//String mconfigparity = SPmconfigparity2.getValue();
mconfigparity = SPmconfigparity2.getValue();
ListPreference SPconfigfontsize2 = (ListPreference) findPreference("config_font_size");
//String mconfigfontsize = SPconfigfontsize2.getValue();
mconfigfontsize = SPconfigfontsize2.getValue();
ListPreference SPconfigconsolamode2 = (ListPreference) findPreference("config_consola_mode");
//String mconfigconsolamode = SPconfigconsolamode2.getValue();
mconfigconsolamode = SPconfigconsolamode2.getValue();
ListPreference SPconfigfindelinea2 = (ListPreference) findPreference("config_fin_delinea");
//String mconfigfindelinea = SPconfigfindelinea2.getValue();
mconfigfindelinea = SPconfigfindelinea2.getValue();
TwoStatePreference SPconfigenableeco2 = (TwoStatePreference) findPreference("config_enable_eco");
Boolean mconfigenableecoX = SPconfigenableeco2.isChecked();
//String mconfigenableeco = String.valueOf(mconfigenableecoX);
mconfigenableeco = String.valueOf(mconfigenableecoX);
ListPreference SPconfigfilesave2 = (ListPreference) findPreference("config_filesave");
//String mconfigfilesave = SPconfigfilesave2.getValue();
mconfigfilesave = SPconfigfilesave2.getValue();
}