mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 02:09:57 +00:00
Don't use a static decleration in a header file (#4944)
* Don't use a static decleration in a header file * Actually add the rest of the commit
This commit is contained in:
parent
e7cfadacd8
commit
4db0c75c8e
@ -120,6 +120,8 @@ float tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // if TCXO is optional, put this h
|
||||
|
||||
using namespace concurrency;
|
||||
|
||||
volatile static const char slipstreamTZString[] = USERPREFS_TZ_STRING;
|
||||
|
||||
// We always create a screen object, but we only init it if we find the hardware
|
||||
graphics::Screen *screen = nullptr;
|
||||
|
||||
@ -707,15 +709,15 @@ void setup()
|
||||
|
||||
// setup TZ prior to time actions.
|
||||
#if !MESHTASTIC_EXCLUDE_TZ
|
||||
LOG_DEBUG("Using compiled/slipstreamed %s\n", USERPREFS_TZ_STRING); // important, removing this clobbers our magic string
|
||||
LOG_DEBUG("Using compiled/slipstreamed %s\n", slipstreamTZString); // important, removing this clobbers our magic string
|
||||
if (*config.device.tzdef && config.device.tzdef[0] != 0) {
|
||||
LOG_DEBUG("Saved TZ: %s \n", config.device.tzdef);
|
||||
setenv("TZ", config.device.tzdef, 1);
|
||||
} else {
|
||||
if (strncmp((const char *)USERPREFS_TZ_STRING, "tzpl", 4) == 0) {
|
||||
if (strncmp((const char *)slipstreamTZString, "tzpl", 4) == 0) {
|
||||
setenv("TZ", "GMT0", 1);
|
||||
} else {
|
||||
setenv("TZ", (const char *)USERPREFS_TZ_STRING, 1);
|
||||
setenv("TZ", (const char *)slipstreamTZString, 1);
|
||||
}
|
||||
}
|
||||
tzset();
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef _USERPREFS_
|
||||
#define _USERPREFS_
|
||||
volatile static const char USERPREFS_TZ_STRING[] = "tzplaceholder ";
|
||||
|
||||
// Slipstream values:
|
||||
|
||||
#define USERPREFS_TZ_STRING "tzplaceholder "
|
||||
|
||||
// Uncomment and modify to set device defaults
|
||||
|
||||
// #define USERPREFS_EVENT_MODE 1
|
||||
|
Loading…
Reference in New Issue
Block a user