Procházet zdrojové kódy

Reduced sleeping time for debugging purpose, and menu timeout is not effective after first command

tags/v1.2.0
Bertrand Lemasle před 7 roky
rodič
revize
878f509e4b
2 změnil soubory, kde provedl 18 přidání a 5 odebrání
  1. +11
    -2
      GpsTracker/Config.h
  2. +7
    -3
      GpsTracker/GpsTracker.ino

+ 11
- 2
GpsTracker/Config.h Zobrazit soubor

@@ -53,7 +53,7 @@ struct config_t {
namespace config {

static const sleepTimings_t defaultSleepTimings[] PROGMEM = {
{ 5, SLEEP_DEFAULT_TIME_SECONDS },
/*{ 5, SLEEP_DEFAULT_TIME_SECONDS },
{ 10, 1200 },
{ 20, 600 },
{ 30, 540 },
@@ -61,8 +61,17 @@ namespace config {
{ 80, 240 },
{ 100, 210 },
{ 180, 180 },
};
};*/

{ 5, 600 },
{ 10, 600 },
{ 20, 600 },
{ 30, 540 },
{ 50, 480 },
{ 80, 240 },
{ 100, 210 },
{ 180, 180 },
};
namespace main {
extern config_t value;



+ 7
- 3
GpsTracker/GpsTracker.ino Zobrazit soubor

@@ -2,12 +2,13 @@
#include "Positions.h"

#if _DEBUG
#define MENU_TIMEOUT 0
#define MENU_DEFAULT_TIMEOUT 0
#else
#define MENU_TIMEOUT 0
#define MENU_DEFAULT_TIMEOUT 5000

#endif
bool bypassMenu = false;
uint16_t menuTimeout = MENU_DEFAULT_TIMEOUT;

void setup() {
logging::setup();
@@ -22,7 +23,10 @@ void setup() {
void loop() {

debug::GPSTRACKER_DEBUG_COMMAND command = debug::GPSTRACKER_DEBUG_COMMAND::RUN;
if (Serial && !bypassMenu) command = debug::menu(MENU_TIMEOUT);
if (Serial && !bypassMenu) command = debug::menu(menuTimeout);

if (command == debug::GPSTRACKER_DEBUG_COMMAND::RUN) bypassMenu = true;
else menuTimeout = 0; //disable timeout once a command has been entered

bypassMenu = command == debug::GPSTRACKER_DEBUG_COMMAND::RUN;



Načítá se…
Zrušit
Uložit