2020-02-01 08:30:53 -08:00
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
TTGO T-BEAM Tracker for The Things Network
|
|
|
|
|
|
|
|
|
|
Copyright (C) 2018 by Xose Pérez <xose dot perez at gmail dot com>
|
|
|
|
|
|
|
|
|
|
This code requires LMIC library by Matthijs Kooijman
|
|
|
|
|
https://github.com/matthijskooijman/arduino-lmic
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
2022-06-05 09:50:06 -05:00
|
|
|
|
2022-04-27 11:05:08 +02:00
|
|
|
#ifdef RV3028_RTC
|
2023-01-21 14:34:29 +01:00
|
|
|
#include "Melopero_RV3028.h"
|
2022-04-27 11:05:08 +02:00
|
|
|
#endif
|
2022-04-28 08:18:03 +02:00
|
|
|
#ifdef PCF8563_RTC
|
2023-01-21 14:34:29 +01:00
|
|
|
#include "pcf8563.h"
|
2022-04-28 08:18:03 +02:00
|
|
|
#endif
|
2022-04-27 11:05:08 +02:00
|
|
|
|
2020-02-01 08:30:53 -08:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// Version
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
2020-02-18 16:18:01 -08:00
|
|
|
// If app version is not specified we assume we are not being invoked by the build script
|
2020-02-14 14:00:08 -08:00
|
|
|
#ifndef APP_VERSION
|
2020-12-10 11:28:15 +08:00
|
|
|
#error APP_VERSION must be set by the build environment
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-01-21 14:34:29 +01:00
|
|
|
// FIXME: This is still needed by the Bluetooth Stack and needs to be replaced by something better. Remnant of the old versioning
|
|
|
|
|
// system.
|
2020-12-10 11:28:15 +08:00
|
|
|
#ifndef HW_VERSION
|
2022-03-20 11:53:37 +01:00
|
|
|
#define HW_VERSION "1.0"
|
2020-02-14 14:00:08 -08:00
|
|
|
#endif
|
2020-02-18 16:18:01 -08:00
|
|
|
|
2020-02-01 08:30:53 -08:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// Configuration
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
2020-02-03 20:18:36 -08:00
|
|
|
// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled)
|
2020-02-05 22:13:27 -08:00
|
|
|
// we don't support jtag on the ttgo - access to gpio 12 is a PITA
|
2020-03-03 08:23:58 -08:00
|
|
|
#define REQUIRE_RADIO true // If true, we will fail to start if the radio is not found
|
2020-02-01 08:30:53 -08:00
|
|
|
|
2020-05-12 17:57:51 -07:00
|
|
|
/// Convert a preprocessor name into a quoted string
|
2023-11-18 08:12:34 -06:00
|
|
|
#define xstr(s) ystr(s)
|
|
|
|
|
#define ystr(s) #s
|
2020-02-01 08:30:53 -08:00
|
|
|
|
2020-05-12 17:57:51 -07:00
|
|
|
/// Convert a preprocessor name into a quoted string and if that string is empty use "unset"
|
|
|
|
|
#define optstr(s) (xstr(s)[0] ? xstr(s) : "unset")
|
|
|
|
|
|
2022-07-31 07:11:47 -05:00
|
|
|
// Nop definition for these attributes that are specific to ESP32
|
|
|
|
|
#ifndef EXT_RAM_ATTR
|
2023-01-21 14:34:29 +01:00
|
|
|
#define EXT_RAM_ATTR
|
2020-09-28 13:10:27 -07:00
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef IRAM_ATTR
|
2023-01-21 14:34:29 +01:00
|
|
|
#define IRAM_ATTR
|
2022-01-07 09:57:29 +03:00
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef RTC_DATA_ATTR
|
2023-01-21 14:34:29 +01:00
|
|
|
#define RTC_DATA_ATTR
|
2020-09-04 17:23:17 -07:00
|
|
|
#endif
|
2020-05-10 12:33:17 -07:00
|
|
|
|
2024-04-16 22:03:36 +08:00
|
|
|
// -----------------------------------------------------------------------------
|
2024-05-08 20:15:06 +08:00
|
|
|
// Regulatory overrides
|
2024-04-16 22:03:36 +08:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
2024-05-08 20:15:06 +08:00
|
|
|
// Override user saved region, for producing region-locked builds
|
|
|
|
|
// #define REGULATORY_LORA_REGIONCODE meshtastic_Config_LoRaConfig_RegionCode_SG_923
|
2024-04-16 22:03:36 +08:00
|
|
|
|
2024-05-09 02:27:08 +08:00
|
|
|
// Total system gain in dBm to subtract from Tx power to remain within regulatory ERP limit for non-licensed operators
|
|
|
|
|
// This value should be set in variant.h and is PA gain + antenna gain (if system ships with an antenna)
|
2024-05-23 23:28:07 +08:00
|
|
|
#ifndef REGULATORY_GAIN_LORA
|
|
|
|
|
#define REGULATORY_GAIN_LORA 0
|
2024-05-09 02:27:08 +08:00
|
|
|
#endif
|
|
|
|
|
|
2022-04-13 19:23:35 -07:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// Feature toggles
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
2022-04-14 15:51:48 -07:00
|
|
|
// Disable use of the NTP library and related features
|
2022-06-22 09:52:08 +02:00
|
|
|
// #define DISABLE_NTP
|
2022-04-13 19:23:35 -07:00
|
|
|
|
2023-01-21 14:34:29 +01:00
|
|
|
// Disable the welcome screen and allow
|
2023-03-23 11:32:04 -05:00
|
|
|
// #define DISABLE_WELCOME_UNSET
|
2022-04-13 21:59:25 -07:00
|
|
|
|
2020-05-10 12:33:17 -07:00
|
|
|
// -----------------------------------------------------------------------------
|
2022-03-28 16:55:58 +02:00
|
|
|
// OLED & Input
|
2020-05-10 12:33:17 -07:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
#define SSD1306_ADDRESS 0x3C
|
2020-10-23 18:00:43 +08:00
|
|
|
#define ST7567_ADDRESS 0x3F
|
2020-05-10 12:33:17 -07:00
|
|
|
|
2020-06-14 10:28:23 +02:00
|
|
|
// The SH1106 controller is almost, but not quite, the same as SSD1306
|
|
|
|
|
// Define this if you know you have that controller or your "SSD1306" misbehaves.
|
2023-03-23 11:32:04 -05:00
|
|
|
// #define USE_SH1106
|
2020-06-14 10:28:23 +02:00
|
|
|
|
2020-10-24 08:16:15 +08:00
|
|
|
// Define if screen should be mirrored left to right
|
|
|
|
|
// #define SCREEN_MIRROR
|
2020-05-10 12:33:17 -07:00
|
|
|
|
2023-07-30 14:51:26 +02:00
|
|
|
// I2C Keyboards (M5Stack, RAK14004, T-Deck)
|
2022-03-28 16:55:58 +02:00
|
|
|
#define CARDKB_ADDR 0x5F
|
2023-07-30 14:51:26 +02:00
|
|
|
#define TDECK_KB_ADDR 0x55
|
2023-08-19 15:37:42 +02:00
|
|
|
#define BBQ10_KB_ADDR 0x1F
|
2022-03-28 16:55:58 +02:00
|
|
|
|
2022-06-05 09:50:06 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// SENSOR
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
#define BME_ADDR 0x76
|
|
|
|
|
#define BME_ADDR_ALTERNATE 0x77
|
|
|
|
|
#define MCP9808_ADDR 0x18
|
2022-06-11 16:44:56 -05:00
|
|
|
#define INA_ADDR 0x40
|
|
|
|
|
#define INA_ADDR_ALTERNATE 0x41
|
2024-03-16 16:01:43 +01:00
|
|
|
#define INA_ADDR_WAVESHARE_UPS 0x43
|
2023-11-04 19:07:00 -06:00
|
|
|
#define INA3221_ADDR 0x42
|
2022-10-07 19:57:55 +08:00
|
|
|
#define QMC6310_ADDR 0x1C
|
|
|
|
|
#define QMI8658_ADDR 0x6B
|
2022-11-12 11:03:29 +01:00
|
|
|
#define QMC5883L_ADDR 0x1E
|
2022-10-15 09:11:05 -05:00
|
|
|
#define SHTC3_ADDR 0x70
|
2022-10-15 14:55:57 -05:00
|
|
|
#define LPS22HB_ADDR 0x5C
|
|
|
|
|
#define LPS22HB_ADDR_ALT 0x5D
|
2024-05-10 07:13:12 -05:00
|
|
|
#define SHT31_4x_ADDR 0x44
|
2023-02-04 13:07:14 -06:00
|
|
|
#define PMSA0031_ADDR 0x12
|
2024-05-31 18:17:53 +02:00
|
|
|
#define AHT10_ADDR 0x38
|
2024-04-20 16:16:20 +02:00
|
|
|
#define RCWL9620_ADDR 0x57
|
2024-05-08 22:14:55 -04:00
|
|
|
#define VEML7700_ADDR 0x10
|
2024-06-01 20:21:39 -05:00
|
|
|
#define TSL25911_ADDR 0x29
|
2024-06-02 09:38:28 -05:00
|
|
|
#define OPT3001_ADDR 0x45
|
|
|
|
|
#define OPT3001_ADDR_ALT 0x44
|
|
|
|
|
#define MLX90632_ADDR 0x3A
|
2024-06-03 21:50:28 -05:00
|
|
|
#define DFROBOT_LARK_ADDR 0x42
|
2024-06-16 02:59:22 +02:00
|
|
|
#define NAU7802_ADDR 0x2A
|
2022-10-13 12:55:28 +02:00
|
|
|
|
2023-03-23 11:32:04 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// ACCELEROMETER
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
#define MPU6050_ADDR 0x68
|
|
|
|
|
#define LIS3DH_ADR 0x18
|
2023-07-22 09:26:54 -05:00
|
|
|
#define BMA423_ADDR 0x19
|
2024-04-12 01:40:14 +01:00
|
|
|
#define LSM6DS3_ADDR 0x6A
|
2024-06-11 17:47:45 -05:00
|
|
|
#define BMX160_ADDR 0x69
|
2023-03-23 11:32:04 -05:00
|
|
|
|
2023-05-06 07:17:40 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// LED
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
#define NCP5623_ADDR 0x38
|
|
|
|
|
|
2022-10-13 12:55:28 +02:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// Security
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
#define ATECC608B_ADDR 0x35
|
|
|
|
|
|
2024-04-15 13:30:45 +01:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// IO Expander
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
#define TCA9555_ADDR 0x26
|
|
|
|
|
|
2020-05-10 12:33:17 -07:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// GPS
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2022-04-02 12:52:50 +02:00
|
|
|
#ifndef GPS_THREAD_INTERVAL
|
2023-09-23 23:45:35 -05:00
|
|
|
#define GPS_THREAD_INTERVAL 200
|
2022-04-02 12:52:50 +02:00
|
|
|
#endif
|
|
|
|
|
|
2023-08-16 22:07:22 +02:00
|
|
|
// convert 24-bit color to 16-bit (56K)
|
|
|
|
|
#define COLOR565(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3))
|
|
|
|
|
|
2022-07-31 07:11:47 -05:00
|
|
|
/* Step #1: offer chance for variant-specific defines */
|
|
|
|
|
#include "variant.h"
|
2022-02-02 12:41:07 -06:00
|
|
|
|
Cleanup GPS, add UC6580 autodetect (#4319)
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Only run speedSelect skip the first time
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Remove Airoha baud rate code
It's no longer needed.
2024-07-23 19:18:27 +08:00
|
|
|
#ifndef GPS_BAUDRATE
|
|
|
|
|
#define GPS_BAUDRATE 9600
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-01-21 14:34:29 +01:00
|
|
|
/* Step #2: follow with defines common to the architecture;
|
2022-07-31 07:11:47 -05:00
|
|
|
also enable HAS_ option not specifically disabled by variant.h */
|
|
|
|
|
#include "architecture.h"
|
2020-02-03 20:18:36 -08:00
|
|
|
|
2024-03-24 19:41:45 +01:00
|
|
|
#ifndef DEFAULT_REBOOT_SECONDS
|
|
|
|
|
#define DEFAULT_REBOOT_SECONDS 7
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef DEFAULT_SHUTDOWN_SECONDS
|
|
|
|
|
#define DEFAULT_SHUTDOWN_SECONDS 2
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-07-31 07:11:47 -05:00
|
|
|
/* Step #3: mop up with disabled values for HAS_ options not handled by the above two */
|
2021-05-11 09:44:41 +08:00
|
|
|
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_WIFI
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_WIFI 0
|
2021-05-11 09:44:41 +08:00
|
|
|
#endif
|
2022-10-22 16:29:50 +02:00
|
|
|
#ifndef HAS_ETHERNET
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_ETHERNET 0
|
2022-10-22 16:29:50 +02:00
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_SCREEN
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_SCREEN 0
|
2021-05-11 09:44:41 +08:00
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_WIRE
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_WIRE 0
|
2020-05-10 12:33:17 -07:00
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_GPS
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_GPS 0
|
2022-07-31 07:11:47 -05:00
|
|
|
#endif
|
|
|
|
|
#ifndef HAS_BUTTON
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_BUTTON 0
|
2022-07-31 07:11:47 -05:00
|
|
|
#endif
|
2023-07-30 14:51:26 +02:00
|
|
|
#ifndef HAS_TRACKBALL
|
|
|
|
|
#define HAS_TRACKBALL 0
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef HAS_TOUCHSCREEN
|
|
|
|
|
#define HAS_TOUCHSCREEN 0
|
|
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_TELEMETRY
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_TELEMETRY 0
|
2022-07-31 07:11:47 -05:00
|
|
|
#endif
|
2023-11-08 21:58:33 +00:00
|
|
|
#ifndef HAS_SENSOR
|
|
|
|
|
#define HAS_SENSOR 0
|
|
|
|
|
#endif
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HAS_RADIO
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_RADIO 0
|
2022-07-31 07:11:47 -05:00
|
|
|
#endif
|
|
|
|
|
#ifndef HAS_RTC
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_RTC 0
|
2020-02-01 14:23:21 -08:00
|
|
|
#endif
|
2022-10-30 10:02:11 -05:00
|
|
|
#ifndef HAS_CPU_SHUTDOWN
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_CPU_SHUTDOWN 0
|
2022-10-30 10:02:11 -05:00
|
|
|
#endif
|
|
|
|
|
#ifndef HAS_BLUETOOTH
|
2023-01-21 14:34:29 +01:00
|
|
|
#define HAS_BLUETOOTH 0
|
2022-10-30 10:02:11 -05:00
|
|
|
#endif
|
2020-02-01 14:23:21 -08:00
|
|
|
|
2022-07-31 07:11:47 -05:00
|
|
|
#ifndef HW_VENDOR
|
2023-01-21 14:34:29 +01:00
|
|
|
#error HW_VENDOR must be defined
|
2024-03-05 14:50:52 +01:00
|
|
|
#endif
|
|
|
|
|
|
2024-03-25 05:33:57 -06:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
// Global switches to turn off features for a minimized build
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// #define MESHTASTIC_MINIMIZE_BUILD 1
|
|
|
|
|
#ifdef MESHTASTIC_MINIMIZE_BUILD
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_MODULES 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_WIFI 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_BLUETOOTH 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_GPS 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_SCREEN 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_MQTT 1
|
2024-07-03 16:02:20 -07:00
|
|
|
#define MESHTASTIC_EXCLUDE_POWERMON 1
|
2024-03-25 05:33:57 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Turn off all optional modules
|
2024-03-05 14:50:52 +01:00
|
|
|
#ifdef MESHTASTIC_EXCLUDE_MODULES
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_AUDIO 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_DETECTIONSENSOR 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_PAXCOUNTER 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_POWER_TELEMETRY 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_RANGETEST 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_REMOTEHARDWARE 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_STOREFORWARD 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_ATAK 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_CANNEDMESSAGES 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_NEIGHBORINFO 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_TRACEROUTE 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_WAYPOINT 1
|
2024-03-11 13:52:46 +01:00
|
|
|
#define MESHTASTIC_EXCLUDE_INPUTBROKER 1
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_SERIAL 1
|
2024-07-03 16:02:20 -07:00
|
|
|
#define MESHTASTIC_EXCLUDE_POWERSTRESS 1
|
2024-03-05 14:50:52 +01:00
|
|
|
#endif
|
2024-03-25 05:33:57 -06:00
|
|
|
|
|
|
|
|
// // Turn off wifi even if HW supports wifi (webserver relies on wifi and is also disabled)
|
|
|
|
|
#ifdef MESHTASTIC_EXCLUDE_WIFI
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_WEBSERVER 1
|
|
|
|
|
#undef HAS_WIFI
|
|
|
|
|
#define HAS_WIFI 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-07-03 15:39:09 -07:00
|
|
|
// Allow code that needs internet to just check HAS_NETWORKING rather than HAS_WIFI || HAS_ETHERNET
|
|
|
|
|
#define HAS_NETWORKING (HAS_WIFI || HAS_ETHERNET)
|
|
|
|
|
|
2024-03-25 05:33:57 -06:00
|
|
|
// // Turn off Bluetooth
|
|
|
|
|
#ifdef MESHTASTIC_EXCLUDE_BLUETOOTH
|
|
|
|
|
#undef HAS_BLUETOOTH
|
|
|
|
|
#define HAS_BLUETOOTH 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// // Turn off GPS
|
|
|
|
|
#ifdef MESHTASTIC_EXCLUDE_GPS
|
|
|
|
|
#undef HAS_GPS
|
|
|
|
|
#define HAS_GPS 0
|
|
|
|
|
#undef MESHTASTIC_EXCLUDE_RANGETEST
|
|
|
|
|
#define MESHTASTIC_EXCLUDE_RANGETEST 1
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Turn off Screen
|
|
|
|
|
#ifdef MESHTASTIC_EXCLUDE_SCREEN
|
|
|
|
|
#undef HAS_SCREEN
|
|
|
|
|
#define HAS_SCREEN 0
|
2024-07-03 15:39:09 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "DebugConfiguration.h"
|
Cleanup GPS, add UC6580 autodetect (#4319)
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Only run speedSelect skip the first time
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Cleanup GPS, add UC6580 autodetect
Our GPS code autodetects devices by default. Previously UC6580 was
statically assigned, and had its own baudrate configuration inside
the GPS code.
This change adds autodetect functionality for the UC6580 and moves
any 'special' GPS baud rate requirements for a variant out into the
variant configuration. Thereby cleaning up core GPS code a little,
saving the whales, and curing global warming.
New Functionality:
* If GPS_BAUDRATE is defined in variant.h, GPS autodetection will
try that baudrate first.
* UC6580 GPS chips are now automatically detected
* Remove Airoha baud rate code
It's no longer needed.
2024-07-23 19:18:27 +08:00
|
|
|
#include "RF95Configuration.h"
|