File tree Expand file tree Collapse file tree 3 files changed +25
-21
lines changed
src/main/java/com/vagell/kv4pht Expand file tree Collapse file tree 3 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ android {
1010 applicationId " com.vagell.kv4pht"
1111 minSdk 26
1212 targetSdk 34
13- versionCode 36
14- versionName " 1.7.2 "
13+ versionCode 37
14+ versionName " 1.7.3 "
1515
1616 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1717
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ public class RadioAudioService extends Service {
105105
106106 // Must match the ESP32 device we support.
107107 // Idx 0 matches https://www.amazon.com/gp/product/B08D5ZD528
108- private static final int [] ESP32_VENDOR_IDS = {4292 };
109- private static final int [] ESP32_PRODUCT_IDS = {60000 };
108+ private static final int [] ESP32_VENDOR_IDS = {4292 , 6790 };
109+ private static final int [] ESP32_PRODUCT_IDS = {60000 , 29987 };
110110
111111 // Version related constants (also see FirmwareUtils for others)
112112 private static final String VERSION_PREFIX = "VERSION" ;
@@ -977,6 +977,8 @@ public void run() {
977977 * @param radioType should be RADIO_TYPE_UHF or RADIO_TYPE_VHF
978978 */
979979 public void setRadioType (String radioType ) {
980+ Log .d ("DEBUG" , "setRadioType: " + radioType );
981+
980982 if (!this .radioType .equals (radioType )) {
981983 this .radioType = radioType ;
982984
Original file line number Diff line number Diff line change @@ -508,24 +508,26 @@ public void forcedPttEnd() { // When user releases physical PTT.
508508 radioAudioService .setChannelMemories (viewModel .getChannelMemories ());
509509
510510 // Can only retrieve moduleType from DB async, so we do that and tell radioAudioService.
511- threadPoolExecutor .execute (new Runnable () {
512- @ Override
513- public void run () {
514- final AppSetting moduleTypeSetting = viewModel .appDb .appSettingDao ().getByName ("moduleType" );
511+ if (null != threadPoolExecutor ) {
512+ threadPoolExecutor .execute (new Runnable () {
513+ @ Override
514+ public void run () {
515+ final AppSetting moduleTypeSetting = viewModel .appDb .appSettingDao ().getByName ("moduleType" );
515516
516- runOnUiThread (new Runnable () {
517- @ Override
518- public void run () {
519- radioAudioService .setRadioType (
520- "UHF" .equals (Optional .ofNullable (moduleTypeSetting ).map (setting -> setting .value ).orElse ("VHF" ))
521- ? RadioAudioService .RADIO_MODULE_UHF
522- : RadioAudioService .RADIO_MODULE_VHF
523- );
524- radioAudioService .start ();
525- }
526- });
527- }
528- });
517+ runOnUiThread (new Runnable () {
518+ @ Override
519+ public void run () {
520+ radioAudioService .setRadioType (
521+ "UHF" .equals (Optional .ofNullable (moduleTypeSetting ).map (setting -> setting .value ).orElse ("VHF" ))
522+ ? RadioAudioService .RADIO_MODULE_UHF
523+ : RadioAudioService .RADIO_MODULE_VHF
524+ );
525+ radioAudioService .start ();
526+ }
527+ });
528+ }
529+ });
530+ }
529531 }
530532
531533 @ Override
You can’t perform that action at this time.
0 commit comments