kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
default make for HELTEC with OLED and no baro, minor updates carried over from STM32
rodzic
8bf73761c1
commit
a57c54cc88
|
@ -620,9 +620,6 @@ static void GPS_MAV(void) // w
|
|||
void vTaskGPS(void* pvParameters)
|
||||
{
|
||||
GPS_Status.Flags = 0;
|
||||
#ifdef WITH_PPS_IRQ
|
||||
GPS_PPS_IRQ_Callback = PPS_IRQ;
|
||||
#endif
|
||||
|
||||
// PPS_TickCount=0;
|
||||
Burst_TickCount=0;
|
||||
|
|
|
@ -86,7 +86,7 @@ UART2 pins:
|
|||
|
||||
*/
|
||||
|
||||
#define PIN_LED_PCB GPIO_NUM_2 // status LED on the PCB: 25 or 2. GPIO25 id DAC2
|
||||
#define PIN_LED_PCB GPIO_NUM_25 // status LED on the PCB: 25 or 2. GPIO25 id DAC2
|
||||
// #define PIN_LED_TX GPIO_NUM_??
|
||||
// #define PIN_LED_RX GPIO_NUM_??
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// #define WITH_MAVLINK
|
||||
|
||||
// #define WITH_BMP180 // BMP180 pressure sensor
|
||||
#define WITH_BMP280 // BMP280 pressure sensor
|
||||
// #define WITH_BMP280 // BMP280 pressure sensor
|
||||
// #define WITH_MS5607 // MS5607 pressure sensor
|
||||
|
||||
#define I2C_SPEED 1000000 // [Hz]
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#define WITH_CONFIG // interpret the console input: $POGNS to change parameters
|
||||
|
||||
// #define WITH_OLED // OLED display on the I2C
|
||||
#define WITH_OLED // OLED display on the I2C
|
||||
|
||||
// #define WITH_BT_SPP // Bluetooth serial port fo smartphone/tablet link
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ void app_main(void)
|
|||
xTaskCreate(vTaskRF, "RF", 2048, 0, tskIDLE_PRIORITY+4, 0);
|
||||
xTaskCreate(vTaskPROC, "PROC", 2048, 0, tskIDLE_PRIORITY+3, 0);
|
||||
xTaskCreate(vTaskGPS, "GPS", 2048, 0, tskIDLE_PRIORITY+4, 0);
|
||||
#if defined(BMP180) || defined(BMP280) || defined(MS5607)
|
||||
xTaskCreate(vTaskSENS, "SENS", 2048, 0, tskIDLE_PRIORITY+4, 0);
|
||||
#endif
|
||||
// xTaskCreate(vTaskCTRL, "CTRL", 1536, 0, tskIDLE_PRIORITY+2, 0);
|
||||
vTaskCTRL(0); // run directly the CTRL task, instead of creating a separate one.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ static void SetTxChannel(uint8_t TxChan=RX_Channel) // default channel t
|
|||
#ifdef WITH_RFM69
|
||||
TRX.WriteTxPower(Parameters.getTxPower(), Parameters.isTxTypeHW()); // set TX for transmission
|
||||
#endif
|
||||
#ifdef WITH_RFM95
|
||||
#if defined(WITH_RFM95) || defined(WITH_SX1272)
|
||||
TRX.WriteTxPower(Parameters.getTxPower()); // set TX for transmission
|
||||
#endif
|
||||
TRX.setChannel(TxChan&0x7F);
|
||||
|
|
11
main/rfm.h
11
main/rfm.h
|
@ -22,7 +22,7 @@ class RFM_RxPktData // packet received by the RF chip
|
|||
Format_UnsDec(CONS_UART_Write, msTime, 4, 3);
|
||||
CONS_UART_Write(' '); Format_Hex(CONS_UART_Write, Channel);
|
||||
CONS_UART_Write('/');
|
||||
Format_SignDec(CONS_UART_Write, -5*RSSI, 4, 1);
|
||||
Format_SignDec(CONS_UART_Write, (int32_t)(-5*RSSI), 4, 1);
|
||||
Format_String(CONS_UART_Write, "dBm\n");
|
||||
if(WithData==0) return;
|
||||
for(uint8_t Idx=0; Idx<Bytes; Idx++)
|
||||
|
@ -114,6 +114,9 @@ class RFM_RxPktData // packet received by the RF chip
|
|||
|
||||
#endif // of WITH_RFM95
|
||||
|
||||
#if defined(WITH_SX1272)
|
||||
#include "sx1272.h" // Registers are almost the same for the sx1272 and the sx1276
|
||||
#endif
|
||||
// bits in IrqFlags1 and IrfFlags2
|
||||
#define RF_IRQ_ModeReady 0x8000 // mode change done (between some modes)
|
||||
#define RF_IRQ_RxReady 0x4000
|
||||
|
@ -332,7 +335,7 @@ class RFM_TRX
|
|||
// ^ 8 or 9 ?
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RFM95
|
||||
#if defined(WITH_RFM95) || defined(WITH_SX1272)
|
||||
void WriteSYNC(uint8_t WriteSize, uint8_t SyncTol, const uint8_t *SyncData)
|
||||
{ if(SyncTol>7) SyncTol=7;
|
||||
if(WriteSize>8) WriteSize=8;
|
||||
|
@ -412,7 +415,7 @@ class RFM_TRX
|
|||
return 0; }
|
||||
#endif
|
||||
|
||||
#ifdef WITH_RFM95
|
||||
#if defined(WITH_RFM95) || defined(WITH_SX1272)
|
||||
|
||||
void WriteTxPower(int8_t TxPower=0)
|
||||
{ if(TxPower<2) TxPower=2;
|
||||
|
@ -467,7 +470,7 @@ class RFM_TRX
|
|||
uint8_t RunningTemp(void) { return ReadByte(REG_TEMP1) & 0x04; } // still running ?
|
||||
uint8_t ReadTemp(void) { return ReadByte(REG_TEMP2); } // read value: -1 deg/LSB
|
||||
#endif
|
||||
#ifdef WITH_RFM95
|
||||
#if defined(WITH_RFM95) || defined(WITH_SX1272)
|
||||
uint8_t ReadTemp(void) { return ReadByte(REG_TEMP); } // read value: -1 deg/LSB
|
||||
#endif
|
||||
/*
|
||||
|
|
Plik diff jest za duży
Load Diff
Ładowanie…
Reference in New Issue