mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-17 00:51:30 +10:00
Add GPIO_DETECT_PA portduino config, and support 13302 detection with it.
This commit is contained in:
@@ -98,6 +98,8 @@ extern struct portduino_config_struct {
|
||||
int lora_usb_pid = 0x5512;
|
||||
int lora_usb_vid = 0x1A86;
|
||||
int spiSpeed = 2000000;
|
||||
bool has_gpio_detect_pa = false;
|
||||
int gpio_detect_pa = 0;
|
||||
int num_pa_points = 1; // default to 1 point, with 0 gain
|
||||
uint16_t tx_gain_lora[22] = {0};
|
||||
pinMapping lora_cs_pin = {"Lora", "CS"};
|
||||
@@ -107,6 +109,7 @@ extern struct portduino_config_struct {
|
||||
pinMapping lora_txen_pin = {"Lora", "TXen"};
|
||||
pinMapping lora_rxen_pin = {"Lora", "RXen"};
|
||||
pinMapping lora_sx126x_ant_sw_pin = {"Lora", "SX126X_ANT_SW"};
|
||||
pinMapping lora_pa_detect_pin = {"Lora", "GPIO_DETECT_PA"};
|
||||
std::vector<pinMapping> extra_pins = {};
|
||||
|
||||
// GPS
|
||||
@@ -194,13 +197,14 @@ extern struct portduino_config_struct {
|
||||
int maxtophone = 100;
|
||||
int MaxNodes = 200;
|
||||
|
||||
pinMapping *all_pins[20] = {&lora_cs_pin,
|
||||
pinMapping *all_pins[21] = {&lora_cs_pin,
|
||||
&lora_irq_pin,
|
||||
&lora_busy_pin,
|
||||
&lora_reset_pin,
|
||||
&lora_txen_pin,
|
||||
&lora_rxen_pin,
|
||||
&lora_sx126x_ant_sw_pin,
|
||||
&lora_pa_detect_pin,
|
||||
&displayDC,
|
||||
&displayCS,
|
||||
&displayBacklight,
|
||||
@@ -245,6 +249,9 @@ extern struct portduino_config_struct {
|
||||
if (rf95_max_power != 20)
|
||||
out << YAML::Key << "RF95_MAX_POWER" << YAML::Value << rf95_max_power;
|
||||
|
||||
if (has_gpio_detect_pa)
|
||||
out << YAML::Key << "GPIO_DETECT_PA" << YAML::Value << gpio_detect_pa;
|
||||
|
||||
if (num_pa_points > 1) {
|
||||
out << YAML::Key << "TX_GAIN_LORA" << YAML::Value << YAML::Flow << YAML::BeginSeq;
|
||||
for (int i = 0; i < num_pa_points; i++) {
|
||||
|
||||
Reference in New Issue
Block a user