kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Send ADSB_VEHICLE messages on the MAVlink portabout other aircrafts
rodzic
2a0e0fa849
commit
e9c5ac0dd6
16
main/hal.cpp
16
main/hal.cpp
|
@ -3,10 +3,12 @@
|
|||
#include <stdbool.h>
|
||||
// #include <sys/select.h>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "hal.h"
|
||||
|
||||
// #include "freertos/FreeRTOS.h"
|
||||
// #include "freertos/task.h"
|
||||
// #include "freertos/semphr.h"
|
||||
// #include "freertos/queue.h"
|
||||
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/uart.h"
|
||||
|
@ -21,13 +23,13 @@
|
|||
|
||||
#include "esp_spiffs.h"
|
||||
|
||||
#ifdef WITH_BT_SPP
|
||||
#include "esp_bt.h"
|
||||
#include "esp_bt_main.h"
|
||||
#include "esp_gap_bt_api.h"
|
||||
#include "esp_bt_device.h"
|
||||
#include "esp_spp_api.h"
|
||||
|
||||
#include "hal.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_OLED
|
||||
#include "ssd1306.h"
|
||||
|
@ -410,7 +412,9 @@ void IO_Configuration(void)
|
|||
uart_set_pin (GPS_UART, PIN_GPS_TXD, PIN_GPS_RXD, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
|
||||
uart_driver_install(GPS_UART, 256, 256, 0, 0, 0);
|
||||
|
||||
#ifdef WITH_OLED
|
||||
gpio_set_direction(PIN_OLED_RST, GPIO_MODE_OUTPUT);
|
||||
#endif
|
||||
|
||||
i2c_config_t I2C_Config = // I2C for OLED and pressue sensor
|
||||
{ mode: I2C_MODE_MASTER,
|
||||
|
|
|
@ -27,13 +27,14 @@
|
|||
// #define WITH_LED_RX
|
||||
// #define WITH_LED_TX
|
||||
|
||||
// #define WITH_GPS_ENABLE // use GPS_ENABLE control line to turn the GPS ON/OFF
|
||||
#define WITH_GPS_ENABLE // use GPS_ENABLE control line to turn the GPS ON/OFF
|
||||
#define WITH_GPS_PPS // use the PPS signal from GPS for precise time-sync.
|
||||
#define WITH_GPS_CONFIG // attempt to configure higher GPS baud rate and airborne mode
|
||||
#define WITH_GPS_UBX // GPS understands UBX
|
||||
// #define WITH_GPS_MTK // GPS understands MTK
|
||||
// #define WITH_GPS_SRF
|
||||
// #define WITH_MAVLINK
|
||||
|
||||
// #define WITH_MAVLINK // use MAVlink as source for the position/pressure data
|
||||
|
||||
// #define WITH_BMP180 // BMP180 pressure sensor
|
||||
// #define WITH_BMP280 // BMP280 pressure sensor
|
||||
|
|
|
@ -135,13 +135,14 @@ static void ProcessRxPacket(OGN_RxPacket *RxPacket, uint8_t RxPacketIdx)
|
|||
Format_String(CONS_UART_Write, Line, 0, Len);
|
||||
xSemaphoreGive(CONS_Mutex);
|
||||
#endif
|
||||
// #ifdef WITH_MAVLINK
|
||||
// MAV_ADSB_VEHICLE MAV_RxReport;
|
||||
// RxPacket->Packet.Encode(&MAV_RxReport);
|
||||
#ifdef WITH_MAVLINK
|
||||
MAV_ADSB_VEHICLE MAV_RxReport;
|
||||
RxPacket->Packet.Encode(&MAV_RxReport);
|
||||
MAV_RxMsg::Send(sizeof(MAV_RxReport), MAV_Seq++, MAV_SysID, MAV_COMP_ID_ADSB, MAV_ID_ADSB_VEHICLE, (const uint8_t *)&MAV_RxReport, GPS_UART_Write);
|
||||
// xSemaphoreTake(CONS_Mutex, portMAX_DELAY);
|
||||
// MAV_RxMsg::Send(sizeof(MAV_RxReport), MAV_Seq++, MAV_SysID, MAV_COMP_ID_ADSB, MAV_ID_ADSB_VEHICLE, (const uint8_t *)&MAV_RxReport, CONS_UART_Write);
|
||||
// xSemaphoreGive(CONS_Mutex);
|
||||
// #endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
54
sdkconfig
54
sdkconfig
|
@ -20,7 +20,8 @@ CONFIG_LOG_BOOTLOADER_LEVEL_INFO=
|
|||
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=2
|
||||
CONFIG_BOOTLOADER_VDDSDIO_BOOST=y
|
||||
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=
|
||||
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
|
||||
|
||||
#
|
||||
# Security features
|
||||
|
@ -32,13 +33,13 @@ CONFIG_FLASH_ENCRYPTION_ENABLED=
|
|||
# Serial flasher config
|
||||
#
|
||||
CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB1"
|
||||
CONFIG_ESPTOOLPY_BAUD_115200B=y
|
||||
CONFIG_ESPTOOLPY_BAUD_230400B=
|
||||
CONFIG_ESPTOOLPY_BAUD_115200B=
|
||||
CONFIG_ESPTOOLPY_BAUD_230400B=y
|
||||
CONFIG_ESPTOOLPY_BAUD_921600B=
|
||||
CONFIG_ESPTOOLPY_BAUD_2MB=
|
||||
CONFIG_ESPTOOLPY_BAUD_OTHER=
|
||||
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
|
||||
CONFIG_ESPTOOLPY_BAUD=115200
|
||||
CONFIG_ESPTOOLPY_BAUD=230400
|
||||
CONFIG_ESPTOOLPY_COMPRESSED=y
|
||||
CONFIG_FLASHMODE_QIO=
|
||||
CONFIG_FLASHMODE_QOUT=
|
||||
|
@ -51,11 +52,11 @@ CONFIG_ESPTOOLPY_FLASHFREQ_26M=
|
|||
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="2MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_RESET=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_NORESET=
|
||||
|
@ -99,6 +100,7 @@ CONFIG_STACK_CHECK_NORM=
|
|||
CONFIG_STACK_CHECK_STRONG=
|
||||
CONFIG_STACK_CHECK_ALL=
|
||||
CONFIG_STACK_CHECK=
|
||||
CONFIG_WARN_WRITE_STRINGS=
|
||||
|
||||
#
|
||||
# Component config
|
||||
|
@ -120,26 +122,15 @@ CONFIG_AWS_IOT_SDK=
|
|||
#
|
||||
# Bluetooth
|
||||
#
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BT_ENABLED=
|
||||
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
|
||||
CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y
|
||||
CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4=
|
||||
CONFIG_BLUEDROID_ENABLED=y
|
||||
CONFIG_BLUEDROID_PINNED_TO_CORE=0
|
||||
CONFIG_BTC_TASK_STACK_SIZE=3072
|
||||
CONFIG_BLUEDROID_MEM_DEBUG=
|
||||
CONFIG_CLASSIC_BT_ENABLED=y
|
||||
CONFIG_A2DP_ENABLE=
|
||||
CONFIG_BT_SPP_ENABLED=y
|
||||
CONFIG_GATTS_ENABLE=y
|
||||
CONFIG_GATTC_ENABLE=y
|
||||
CONFIG_BLE_SMP_ENABLE=y
|
||||
CONFIG_BT_STACK_NO_LOG=
|
||||
CONFIG_BT_ACL_CONNECTIONS=4
|
||||
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=
|
||||
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=
|
||||
CONFIG_SMP_ENABLE=y
|
||||
CONFIG_BT_RESERVE_DRAM=0x10000
|
||||
CONFIG_BT_RESERVE_DRAM=0
|
||||
|
||||
#
|
||||
# ADC configuration
|
||||
#
|
||||
CONFIG_ADC_FORCE_XPD_FSM=
|
||||
CONFIG_ADC2_DISABLE_DAC=y
|
||||
|
||||
#
|
||||
# ESP32-specific
|
||||
|
@ -148,7 +139,6 @@ CONFIG_ESP32_DEFAULT_CPU_FREQ_80=y
|
|||
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=80
|
||||
CONFIG_MEMMAP_SMP=y
|
||||
CONFIG_SPIRAM_SUPPORT=
|
||||
CONFIG_MEMMAP_TRACEMEM=
|
||||
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
|
||||
|
@ -208,19 +198,21 @@ CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
|
|||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
|
||||
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
|
||||
CONFIG_ESP32_RTC_XTAL_BOOTSTRAP_CYCLES=100
|
||||
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
|
||||
CONFIG_ESP32_XTAL_FREQ_40=
|
||||
CONFIG_ESP32_XTAL_FREQ_26=y
|
||||
CONFIG_ESP32_XTAL_FREQ_AUTO=
|
||||
CONFIG_ESP32_XTAL_FREQ=26
|
||||
CONFIG_ESP32_XTAL_FREQ_26=
|
||||
CONFIG_ESP32_XTAL_FREQ_AUTO=y
|
||||
CONFIG_ESP32_XTAL_FREQ=0
|
||||
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
|
||||
CONFIG_NO_BLOBS=
|
||||
CONFIG_ESP_TIMER_PROFILING=
|
||||
CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS=
|
||||
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
|
||||
|
||||
#
|
||||
# Wi-Fi
|
||||
#
|
||||
CONFIG_SW_COEXIST_ENABLE=
|
||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
|
||||
|
|
Ładowanie…
Reference in New Issue