mirror of
https://github.com/meshtastic/firmware.git
synced 2026-03-26 02:53:33 -04:00
Adds a flag to turn the GPS power rail off entirely on tbeam
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "configuration.h"
|
||||
#include "graphics/Screen.h"
|
||||
#include "power.h"
|
||||
#include "GPS.h"
|
||||
#include <OneButton.h>
|
||||
|
||||
namespace concurrency
|
||||
@@ -159,9 +160,21 @@ class ButtonThread : public concurrency::OSThread
|
||||
|
||||
static void userButtonDoublePressed()
|
||||
{
|
||||
#if defined(USE_EINK) && defined(PIN_EINK_EN)
|
||||
#if defined(USE_EINK) && defined(PIN_EINK_EN)
|
||||
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
|
||||
#endif
|
||||
#endif
|
||||
#if defined(GPS_POWER_TOGGLE)
|
||||
if(gps->gpsPowerflag)
|
||||
{
|
||||
DEBUG_MSG("Flag set to false for gps power\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_MSG("Flag set to true to restore power\n");
|
||||
}
|
||||
gps->gpsPowerflag = !(gps->gpsPowerflag);
|
||||
doGPSpowersave(gps->gpsPowerflag);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void userButtonMultiPressed()
|
||||
|
||||
Reference in New Issue
Block a user