diff --git a/software/app/Settings/ui.html b/software/app/Settings/ui.html
index 3f470a126..7a9d1d038 100644
--- a/software/app/Settings/ui.html
+++ b/software/app/Settings/ui.html
@@ -23,7 +23,6 @@
const baudrate = 0;
const server = "";
const key = "";
-const adb = 0;
const voice = 0;
const power_save = 0;
@@ -42,7 +41,7 @@
+ key + ","
+ document.getElementById("rotate").value + ","
+ document.getElementById("orientation").value + ","
- + adb + ","
+ + document.getElementById("adb").value + ","
+ document.getElementById("idpref").value + ","
+ document.getElementById("vmode").value + ","
+ voice + ","
@@ -114,6 +113,13 @@
UpdateChecksum();
}
+function SelADB()
+{
+ var adb = document.getElementById("ADBs");
+ document.getElementById("adb").value = adb.options[adb.selectedIndex].value;
+ UpdateChecksum();
+}
+
function SelIDPref()
{
var idpref = document.getElementById("IDPrefs");
@@ -151,6 +157,7 @@
document.getElementById("rotate").value = 0;
document.getElementById("orientation").value = 0;
document.getElementById("zoom").value = 2;
+ document.getElementById("adb").value = 3;
document.getElementById("idpref").value = 3;
document.getElementById("aghost").value = 0;
document.getElementById("filter").value = 0;
@@ -225,6 +232,17 @@
Interface settings
+
+Aircrafts data |
+
+
+ |
+
+
ID preference |
@@ -272,6 +290,7 @@ Interface settings
+
diff --git a/software/firmware/source/SoftRF/src/platform/ESP32.cpp b/software/firmware/source/SoftRF/src/platform/ESP32.cpp
index a372ae02c..8a6573eda 100644
--- a/software/firmware/source/SoftRF/src/platform/ESP32.cpp
+++ b/software/firmware/source/SoftRF/src/platform/ESP32.cpp
@@ -1486,7 +1486,7 @@ static void ESP32_setup()
axp_2xxx.setBLDO2Voltage(3300); // V2.1 - SA868
axp_2xxx.enableBLDO2();
- // axp_2xxx.setALDO3Voltage(3300); // V2.1 - Amp. OE Ctrl
+ axp_2xxx.setALDO3Voltage(3300); // V2.1 - Amp. OE Ctrl
#if defined(USE_SA8X8)
#if 0
@@ -1684,6 +1684,35 @@ static void ESP32_post_init()
}
}
}
+
+#if !defined(EXCLUDE_VOICE_MESSAGE)
+ if (esp32_board == ESP32_LILYGO_T_TWR_V2_1 && uSD_is_attached)
+ {
+ char filename[MAX_FILENAME_LEN];
+ strcpy(filename, WAV_FILE_PREFIX);
+ strcat(filename, "POST");
+ strcat(filename, WAV_FILE_SUFFIX);
+ if (uSD.exists(filename)) {
+ axp_2xxx.enableALDO3();
+ Audio_Sink->SetPinout(I2S_PIN_NO_CHANGE,
+ I2S_PIN_NO_CHANGE,
+ SOC_GPIO_PIN_TWR2_PDM_AUX,
+ I2S_PIN_NO_CHANGE);
+ Audio_Sink->SetGain(/* 0.0625 */ 0.125 /* 0.25 */);
+
+ play_file(filename);
+
+ axp_2xxx.disableALDO3();
+ I2S_Init((i2s_mode_t) (I2S_MODE_TX | I2S_MODE_PDM),
+ I2S_BITS_PER_SAMPLE_16BIT);
+ Audio_Sink->SetPinout(I2S_PIN_NO_CHANGE,
+ I2S_PIN_NO_CHANGE,
+ SOC_GPIO_PIN_TWR2_PDM_OUT,
+ I2S_PIN_NO_CHANGE);
+ Audio_Sink->SetGain(/* 0.0625 */ 0.125 /* 0.25 */);
+ }
+ }
+#endif /* EXCLUDE_VOICE_MESSAGE */
#endif /* CONFIG_IDF_TARGET_ESP32S3 */
Serial.println();
diff --git a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TTWR.h b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TTWR.h
index e92cca640..ad6f13813 100644
--- a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TTWR.h
+++ b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_TTWR.h
@@ -20,8 +20,8 @@
// Radio SPI (not in use)
#define SOC_GPIO_PIN_TWR2_MOSI 16
-#define SOC_GPIO_PIN_TWR2_MISO 45
-#define SOC_GPIO_PIN_TWR2_SCK 15
+#define SOC_GPIO_PIN_TWR2_MISO 45 /* T-TWR 2.0 only */
+#define SOC_GPIO_PIN_TWR2_SCK 15 /* T-TWR 2.0 only */
#define SOC_GPIO_PIN_TWR2_SS 14
// microSD
@@ -43,3 +43,6 @@
#define SOC_GPIO_PIN_TWR2_ENC_A 47
#define SOC_GPIO_PIN_TWR2_ENC_B 46
+/* T-TWR 2.1 only */
+#define SOC_GPIO_PIN_TWR2_PDM_AUX 45
+#define SOC_GPIO_PIN_TWR2_MIC_ADC 15
|