mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 05:31:25 +00:00
Merge branch 'master' into 2.5-changes
This commit is contained in:
commit
0bd17e6da6
@ -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.
|
||||
*/
|
||||
|
10
src/main.h
10
src/main.h
@ -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;
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user