Merge branch 'master' into 2.5-changes

This commit is contained in:
Jonathan Bennett 2024-08-11 16:28:43 -05:00 committed by GitHub
commit 0bd17e6da6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 47 deletions

View File

@ -51,7 +51,7 @@ enum GPSPowerState : uint8_t {
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.
*/

View File

@ -65,12 +65,6 @@ extern bool isVibrating;
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"
const char *getDeviceName();
@ -91,5 +85,5 @@ void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), rp2040Setup(), clearB
meshtastic_DeviceMetadata getDeviceMetadata();
// FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
extern SPISettings spiSettings;
// We default to 4MHz SPI, SPI mode 0
extern SPISettings spiSettings;

View File

@ -26,41 +26,3 @@ void *operator new(size_t size, SimpleAllocator &p)
{
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