merge new remote#2
This commit is contained in:
@@ -23,4 +23,4 @@ build_flags =
|
|||||||
-DCORE_DEBUG_LEVEL=4
|
-DCORE_DEBUG_LEVEL=4
|
||||||
-DNDEF_DEBUG=1
|
-DNDEF_DEBUG=1
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
upload_port = muziekdoos.local
|
upload_port = muziekdoos.local
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ uint32_t looptime = 0;
|
|||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
initPower();
|
initPower();
|
||||||
|
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Serial.setDebugOutput(true);
|
Serial.setDebugOutput(true);
|
||||||
log_i("muziekdoos v2");
|
log_i("muziekdoos v2");
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ void OtaProcess_class::active(void)
|
|||||||
{
|
{
|
||||||
log_i("Otastate = active(=>idle)");
|
log_i("Otastate = active(=>idle)");
|
||||||
m_newState = false;
|
m_newState = false;
|
||||||
|
setProcessState(processIdle);
|
||||||
}
|
}
|
||||||
idle();
|
idle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "ArduinoOTA.h"
|
|
||||||
#include "secrets.h"
|
#include "secrets.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "power.h"
|
||||||
|
|
||||||
|
#include "ArduinoOTA.h"
|
||||||
|
#include "JC_Button.h"
|
||||||
#include "LITTLEFS.h"
|
#include "LITTLEFS.h"
|
||||||
|
|
||||||
#define WIFICONNECTINTERVAL 1000
|
#define WIFICONNECTINTERVAL 1000
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ POWERSTATES lastState = off;
|
|||||||
Button buttonPower(PWR_BTN, 250UL, 1U, 0);
|
Button buttonPower(PWR_BTN, 250UL, 1U, 0);
|
||||||
extern OtaProcess_class ota;
|
extern OtaProcess_class ota;
|
||||||
|
|
||||||
|
Button* getPowerButton()
|
||||||
|
{
|
||||||
|
return &buttonPower;
|
||||||
|
}
|
||||||
|
|
||||||
void initPowerOn(void)
|
void initPowerOn(void)
|
||||||
{
|
{
|
||||||
pinMode(PWR_HOLD, OUTPUT);
|
pinMode(PWR_HOLD, OUTPUT);
|
||||||
|
|||||||
@@ -36,5 +36,7 @@ void PowerKeepAlive(void);
|
|||||||
void initBattery(void);
|
void initBattery(void);
|
||||||
bool handleBattery(void);
|
bool handleBattery(void);
|
||||||
|
|
||||||
|
Button* getPowerButton();
|
||||||
|
|
||||||
void initPower(void);
|
void initPower(void);
|
||||||
void handlePower(void);
|
void handlePower(void);
|
||||||
Reference in New Issue
Block a user