mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-15 15:05:48 +00:00
Merge branch 'meshtastic:master' into master
This commit is contained in:
commit
5b92d38bd4
@ -1 +1 @@
|
|||||||
Subproject commit 2fa7d6a4b702fcd58b54b0d1d6e4b3b85164f649
|
Subproject commit 071fd931ec6679bb21427c872f9839edea63e351
|
@ -1220,6 +1220,14 @@ GnssModel_t GPS::probe(int serialSpeed)
|
|||||||
return GNSS_MODEL_UC6580;
|
return GNSS_MODEL_UC6580;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearBuffer();
|
||||||
|
_serial_gps->write("$PDTINFO\r\n");
|
||||||
|
delay(750);
|
||||||
|
if (getACK("UM600", 500) == GNSS_RESPONSE_OK) {
|
||||||
|
LOG_INFO("UM600 detected, using UC6580 Module\n");
|
||||||
|
return GNSS_MODEL_UC6580;
|
||||||
|
}
|
||||||
|
|
||||||
// Get version information for ATGM336H
|
// Get version information for ATGM336H
|
||||||
clearBuffer();
|
clearBuffer();
|
||||||
_serial_gps->write("$PCAS06,1*1A\r\n");
|
_serial_gps->write("$PCAS06,1*1A\r\n");
|
||||||
|
@ -51,7 +51,7 @@ enum GPSPowerState : uint8_t {
|
|||||||
const char *getDOPString(uint32_t dop);
|
const char *getDOPString(uint32_t dop);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A gps class that only reads from the GPS periodically (and FIXME - eventually keeps the gps powered down except when reading)
|
* A gps class that only reads from the GPS periodically and keeps the gps powered down except when reading
|
||||||
*
|
*
|
||||||
* When new data is available it will notify observers.
|
* When new data is available it will notify observers.
|
||||||
*/
|
*/
|
||||||
|
@ -65,12 +65,6 @@ extern bool isVibrating;
|
|||||||
|
|
||||||
extern int TCPPort; // set by Portduino
|
extern int TCPPort; // set by Portduino
|
||||||
|
|
||||||
// extern Observable<meshtastic::PowerStatus> newPowerStatus; //TODO: move this to main-esp32.cpp somehow or a helper class
|
|
||||||
|
|
||||||
// extern meshtastic::PowerStatus *powerStatus;
|
|
||||||
// extern meshtastic::GPSStatus *gpsStatus;
|
|
||||||
// extern meshtastic::NodeStatusHandler *nodeStatusHandler;
|
|
||||||
|
|
||||||
// Return a human readable string of the form "Meshtastic_ab13"
|
// Return a human readable string of the form "Meshtastic_ab13"
|
||||||
const char *getDeviceName();
|
const char *getDeviceName();
|
||||||
|
|
||||||
@ -91,5 +85,5 @@ void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), rp2040Setup(), clearB
|
|||||||
|
|
||||||
meshtastic_DeviceMetadata getDeviceMetadata();
|
meshtastic_DeviceMetadata getDeviceMetadata();
|
||||||
|
|
||||||
// FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
|
// We default to 4MHz SPI, SPI mode 0
|
||||||
extern SPISettings spiSettings;
|
extern SPISettings spiSettings;
|
@ -180,6 +180,10 @@ typedef enum _meshtastic_HardwareModel {
|
|||||||
meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,
|
meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,
|
||||||
/* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */
|
/* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */
|
||||||
meshtastic_HardwareModel_TRACKER_T1000_E = 71,
|
meshtastic_HardwareModel_TRACKER_T1000_E = 71,
|
||||||
|
/* RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */
|
||||||
|
meshtastic_HardwareModel_RAK3172 = 72,
|
||||||
|
/* Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. */
|
||||||
|
meshtastic_HardwareModel_WIO_E5 = 73,
|
||||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||||
|
@ -63,7 +63,13 @@ typedef enum _meshtastic_TelemetrySensorType {
|
|||||||
/* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */
|
/* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */
|
||||||
meshtastic_TelemetrySensorType_DFROBOT_LARK = 24,
|
meshtastic_TelemetrySensorType_DFROBOT_LARK = 24,
|
||||||
/* NAU7802 Scale Chip or compatible */
|
/* NAU7802 Scale Chip or compatible */
|
||||||
meshtastic_TelemetrySensorType_NAU7802 = 25
|
meshtastic_TelemetrySensorType_NAU7802 = 25,
|
||||||
|
/* BMP3XX High accuracy temperature and pressure */
|
||||||
|
meshtastic_TelemetrySensorType_BMP3XX = 26,
|
||||||
|
/* ICM-20948 9-Axis digital motion processor */
|
||||||
|
meshtastic_TelemetrySensorType_ICM20948 = 27,
|
||||||
|
/* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */
|
||||||
|
meshtastic_TelemetrySensorType_MAX17048 = 28
|
||||||
} meshtastic_TelemetrySensorType;
|
} meshtastic_TelemetrySensorType;
|
||||||
|
|
||||||
/* Struct definitions */
|
/* Struct definitions */
|
||||||
@ -197,8 +203,8 @@ extern "C" {
|
|||||||
|
|
||||||
/* Helper constants for enums */
|
/* Helper constants for enums */
|
||||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_NAU7802
|
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_MAX17048
|
||||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_NAU7802+1))
|
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_MAX17048+1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,41 +26,3 @@ void *operator new(size_t size, SimpleAllocator &p)
|
|||||||
{
|
{
|
||||||
return p.alloc(size);
|
return p.alloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// This was a dumb idea, turn off for now
|
|
||||||
|
|
||||||
SimpleAllocator *activeAllocator;
|
|
||||||
|
|
||||||
AllocatorScope::AllocatorScope(SimpleAllocator &a)
|
|
||||||
{
|
|
||||||
assert(!activeAllocator);
|
|
||||||
activeAllocator = &a;
|
|
||||||
}
|
|
||||||
|
|
||||||
AllocatorScope::~AllocatorScope()
|
|
||||||
{
|
|
||||||
assert(activeAllocator);
|
|
||||||
activeAllocator = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Global new/delete, uses a simple allocator if it is in scope
|
|
||||||
|
|
||||||
void *operator new(size_t sz) throw(std::bad_alloc)
|
|
||||||
{
|
|
||||||
void *mem = activeAllocator ? activeAllocator->alloc(sz) : malloc(sz);
|
|
||||||
if (mem)
|
|
||||||
return mem;
|
|
||||||
else
|
|
||||||
throw std::bad_alloc();
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete(void *ptr) throw()
|
|
||||||
{
|
|
||||||
if (activeAllocator)
|
|
||||||
LOG_WARN("Leaking an active allocator object\n"); // We don't properly handle this yet
|
|
||||||
else
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue
Block a user