Compare commits
16 Commits
as5600
...
startup-so
| Author | SHA1 | Date | |
|---|---|---|---|
| b82f9f90a8 | |||
| 1d7b8fb492 | |||
| 3a88dcfc07 | |||
| 89af60bd22 | |||
| f17f9ddf7c | |||
| 6d9b3fadd0 | |||
| 966868b531 | |||
| 715359f89e | |||
| da809f1ae4 | |||
| d353bc4f38 | |||
| 30db59d4a8 | |||
| 6dca8972e3 | |||
| 3af2487843 | |||
| 8ad62b3fc1 | |||
| c075d1a812 | |||
| c6e9e8b0ba |
26
.gitmodules
vendored
26
.gitmodules
vendored
@@ -1,33 +1,31 @@
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/ESP8266Audio"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/ESP8266Audio
|
||||
url = http://debianvm.local:3000/libs/ESP8266Audio.git
|
||||
url = http://git.oldemans.nl/libs/ESP8266Audio.git
|
||||
branch = master
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/littleFS_esp32"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/littleFS_esp32
|
||||
url = http://debianvm.local:3000/libs/LittleFS_esp32
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/JCButton"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/JCButton
|
||||
url = http://debianvm.local:3000/libs/JCButton.git
|
||||
url = http://git.oldemans.nl/libs/JCButton.git
|
||||
branch = master
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/NDEF"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/NDEF
|
||||
url = http://debianvm.local:3000/libs/rfid.NDEF.git
|
||||
url = http://git.oldemans.nl/libs/rfid.NDEF.git
|
||||
branch = master
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/PN532"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/PN532
|
||||
url = http://debianvm.local:3000/libs/rfid.PN532.git
|
||||
url = http://git.oldemans.nl/libs/rfid.PN532.git
|
||||
branch = master
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/PN532_SPI"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/PN532_SPI
|
||||
url = http://debianvm.local:3000/libs/rfid.PN532_SPI.git
|
||||
url = http://git.oldemans.nl/libs/rfid.PN532_SPI.git
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/BatterySense"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/BatterySense
|
||||
url = http://debianvm.local:3000/libs/BatterySense.git
|
||||
branch = master
|
||||
[submodule "CAD"]
|
||||
path = CAD
|
||||
url = http://debianvm.local:3000/projects_leo/muziekdooos_hardware.git
|
||||
url = http://git.oldemans.nl/libs/BatterySense.git
|
||||
branch = master
|
||||
[submodule "FW/leo_muziekdoos_esp32/lib/ADC_ADS1x15"]
|
||||
path = FW/leo_muziekdoos_esp32/lib/ADC_ADS1x15
|
||||
url = http://debianvm.local:3000/libs/ADC_ADS1X15.git
|
||||
url = http://git.oldemans.nl/libs/ADC_ADS1X15.git
|
||||
branch = master
|
||||
[submodule "CAD-SCH"]
|
||||
path = CADSCH
|
||||
url = http://git.oldemans.nl/projects_leo/muziekdooos_hardware.git
|
||||
branch = master
|
||||
|
||||
BIN
FW/leo_muziekdoos_esp32/data/ping.mp3
Normal file
BIN
FW/leo_muziekdoos_esp32/data/ping.mp3
Normal file
Binary file not shown.
@@ -25,8 +25,9 @@
|
||||
"AudioGain": 0.5,
|
||||
"ScanTimeout": 50,
|
||||
"HardwareVersion": 2,
|
||||
"GameTimeout": 10000,
|
||||
"PowerTimeout": 420000,
|
||||
"GameTimeout": 20000,
|
||||
"PowerTimeout": 30,
|
||||
"PowerOTADelay": 4000,
|
||||
"Brightness": 20
|
||||
"Brightness": 2,
|
||||
"ping": "/ping.mp3"
|
||||
}
|
||||
Submodule FW/leo_muziekdoos_esp32/lib/ESP8266Audio updated: 6110583190...818dfd5cb7
Submodule FW/leo_muziekdoos_esp32/lib/littleFS_esp32 deleted from ccc54923d4
@@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env]
|
||||
src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
|
||||
build_src_filter = +<*> -<.git/> -<.svn/> -<example/> -<examples/> -<test/> -<tests/>
|
||||
|
||||
|
||||
[env:esp32-pico]
|
||||
@@ -22,12 +22,14 @@ lib_deps =
|
||||
fastled/FastLED@^3.5.0
|
||||
#robtillaart/AS5600 @ ^0.3.4
|
||||
robtillaart/AS5600 @ ^0.3.6
|
||||
src_filter = ${env.build_src_filter}
|
||||
LITTLEFS
|
||||
build_src_filter = ${env.build_src_filter}
|
||||
lib_ldf_mode = deep+
|
||||
build_flags =
|
||||
-DHARDWARE=2
|
||||
-DCORE_DEBUG_LEVEL=3
|
||||
-DNDEF_DEBUG=1
|
||||
-fexceptions
|
||||
extra_scripts = ./littlefsbuilder.py
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "config.h"
|
||||
#include <vector>
|
||||
#include "FS.h"
|
||||
#include "LITTLEFS.h"
|
||||
#include <LittleFS.h>
|
||||
#include "ArduinoJson.h"
|
||||
|
||||
const char *tagConfigfile = "/settings.json";
|
||||
@@ -77,7 +77,23 @@ float getFloatParam(String param, int def)
|
||||
}
|
||||
if(!settingsDoc.containsKey(param))
|
||||
{
|
||||
log_e("param(%s)",param);
|
||||
log_e("param(%s) not availavle",param);
|
||||
return def;
|
||||
}
|
||||
return settingsDoc[param];
|
||||
}
|
||||
|
||||
String getStringParam(String param, String def)
|
||||
{
|
||||
log_i("Get String param %s",param );
|
||||
if( param == "")
|
||||
{
|
||||
log_e("No param(%s) given",param);
|
||||
return def;
|
||||
}
|
||||
if(!settingsDoc.containsKey(param))
|
||||
{
|
||||
log_e("param(%s) not availavle",param);
|
||||
return def;
|
||||
}
|
||||
return settingsDoc[param];
|
||||
@@ -86,7 +102,7 @@ float getFloatParam(String param, int def)
|
||||
void loadConfig(const char *fname)
|
||||
{
|
||||
log_i("config: load");
|
||||
File file = LITTLEFS.open(fname);
|
||||
File file = LittleFS.open(fname);
|
||||
|
||||
DeserializationError error = deserializeJson(settingsDoc, file);
|
||||
if (error)
|
||||
|
||||
@@ -7,6 +7,7 @@ bool getUIDvalid(String uid);
|
||||
String GetWifiPassword(String ssid);
|
||||
int GetIntparam(String param, int def = -1);
|
||||
float getFloatParam( String param, int def = -1);
|
||||
String getStringParam(String param, String def = "error");
|
||||
|
||||
void initConfig(void);
|
||||
void handleConfig(void);
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
bool newState = true;
|
||||
uint32_t idleTime = 0;
|
||||
uint32_t gameTimeout = 0;
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +25,7 @@ GameStates gameState = GameStates::stateInit;
|
||||
|
||||
void initGame(void)
|
||||
{
|
||||
gameTimeout = GetIntparam("GameTimeout", TIMEOUT_ARMED);
|
||||
log_i("Game: init: done");
|
||||
}
|
||||
|
||||
@@ -151,7 +153,7 @@ void handleGame(void)
|
||||
else
|
||||
{
|
||||
uint32_t now = millis();
|
||||
if(now - idleTime > TIMEOUT_ARMED)
|
||||
if(now - idleTime > gameTimeout)
|
||||
{
|
||||
log_i("Armed timed-out, clear current UID and go back to Idle");
|
||||
clearRFIDlastUID();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "power.h"
|
||||
|
||||
#define TIMEOUT_IDLE 20000
|
||||
#define TIMEOUT_ARMED 10000
|
||||
#define TIMEOUT_ARMED 20000
|
||||
|
||||
typedef enum{
|
||||
stateInit,
|
||||
|
||||
@@ -47,6 +47,10 @@ void loop()
|
||||
handleHallSensor();
|
||||
handleGame();
|
||||
}
|
||||
else if(getPowerState() == POWERSTATES::poweringOn2)
|
||||
{
|
||||
handleAudio();
|
||||
}
|
||||
else if (getPowerState() == POWERSTATES::overTheAir2)
|
||||
{
|
||||
handleOta();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "ArduinoOTA.h"
|
||||
#include "JC_Button.h"
|
||||
#include "LITTLEFS.h"
|
||||
#include "LittleFS.h"
|
||||
|
||||
#define WIFICONNECTINTERVAL 1000
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ void handlePowerState(void)
|
||||
else
|
||||
{
|
||||
log_i("Release for poweron, hold for %d to OTA", (POWERBUTTONOTADELAY - buttonPower.getPressedFor()));
|
||||
playSong(getStringParam("ping"));
|
||||
}
|
||||
if (buttonPower.pressedFor(POWERBUTTONOTADELAY))
|
||||
{
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
#include "audio.h"
|
||||
#include "ota.h"
|
||||
#include "led.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#define TIMEOUT_POWER (7 * 1000 * 60) // 7 minutes timeout
|
||||
#define TIMEOUT_POWER (30 * 1000 * 60) // 7 minutes timeout
|
||||
#define POWERBUTTONDELAY 400
|
||||
//#define BATTERYMEASUREDELAY 60000
|
||||
#define POWERBUTTONOTADELAY 4000
|
||||
|
||||
@@ -92,7 +92,7 @@ bool CheckBattery(void)
|
||||
BatteryVoltage = battery.voltage();
|
||||
BatterySensor = battery.level(BatteryVoltage);
|
||||
digitalWrite(MEAS_EN, HIGH);
|
||||
log_i("read batt, ticks=%d, raw=%4.2f, vbatt=%d, level=%d", battticks, vbattraw, BatteryVoltage, BatterySensor);
|
||||
log_v("read batt, ticks=%d, raw=%4.2f, vbatt=%d, level=%d", battticks, vbattraw, BatteryVoltage, BatterySensor);
|
||||
if (BatteryVoltage < VBATTMIN)
|
||||
{
|
||||
uint32_t timeNow = millis();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define ESP_V2
|
||||
#endif
|
||||
#else
|
||||
#include <LITTLEFS.h>
|
||||
#include <LittleFS.h>
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_LITTLEFS_FOR_IDF_3_2
|
||||
@@ -92,12 +92,12 @@ void readFile(fs::FS &fs, const char *path)
|
||||
|
||||
void initStorage()
|
||||
{
|
||||
if (!LITTLEFS.begin(FORMAT_LITTLEFS_IF_FAILED))
|
||||
if (!LittleFS.begin(FORMAT_LITTLEFS_IF_FAILED))
|
||||
{
|
||||
log_e("LITTLEFS Mount Failed");
|
||||
log_e("LittleFS Mount Failed");
|
||||
return;
|
||||
}
|
||||
listDir(LITTLEFS, "/", 0);
|
||||
listDir(LittleFS, "/", 0);
|
||||
}
|
||||
|
||||
void handleStorage()
|
||||
|
||||
BIN
administratie/kwitantie_20230430.docx
Normal file
BIN
administratie/kwitantie_20230430.docx
Normal file
Binary file not shown.
BIN
administratie/kwitantie_20230430.pdf
Normal file
BIN
administratie/kwitantie_20230430.pdf
Normal file
Binary file not shown.
BIN
administratie/muziekdoos_uitgaven.xlsx
Normal file
BIN
administratie/muziekdoos_uitgaven.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user