feat (Filebrowser): added file browser to RFID-assignment
* added a couple of JavaScript libraries
* added functions to main.cpp for file handling
* added websocket handller for index file notifications
* added webserver route for delivering file index
* refactored html notifications, introduced toastr
var errorBox = '<divclass="alert alert-danger alert-dismissible fade show"role="alert">Es ist ein Fehler aufgetreten!<buttontype="button"class="close"data-dismiss="alert"aria-label="Close"><spanaria-hidden="true">×</span></button></div>';
var okBox = '<divclass="alert alert-success alert-dismissible fade show"role="alert">Aktion erfolgreich ausgeführt.<buttontype="button"class="close"data-dismiss="alert"aria-label="Close"><spanaria-hidden="true">×</span></button></div>';
#define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd
//#define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd
#define FTP_ENABLE // Enables FTP-server
#define FTP_ENABLE // Enables FTP-server
#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled
#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled
#define NEOPIXEL_REVERSE_ROTATION // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
#define NEOPIXEL_REVERSE_ROTATION // Some Neopixels are adressed/soldered counter-clockwise. This can be configured here.
#define LANGUAGE 1 // 1 = deutsch; 2 = english
#define LANGUAGE 1 // 1 = deutsch; 2 = english
#define HEADPHONE_ADJUST_ENABLE // Used to adjust (lower) volume for optional headphone-pcb (refer maxVolumeSpeaker / maxVolumeHeadphone)
//#define HEADPHONE_ADJUST_ENABLE // Used to adjust (lower) volume for optional headphone-pcb (refer maxVolumeSpeaker / maxVolumeHeadphone)
//#define SINGLE_SPI_ENABLE // If only one SPI-instance should be used instead of two (not yet working!)
//#define SINGLE_SPI_ENABLE // If only one SPI-instance should be used instead of two (not yet working!)
#define SHUTDOWN_IF_SD_BOOT_FAILS // Will put ESP to deepsleep if boot fails due to SD. Really recommend this if there's in battery-mode no other way to restart ESP! Interval adjustable via deepsleepTimeAfterBootFails.
#define SHUTDOWN_IF_SD_BOOT_FAILS // Will put ESP to deepsleep if boot fails due to SD. Really recommend this if there's in battery-mode no other way to restart ESP! Interval adjustable via deepsleepTimeAfterBootFails.
#define MEASURE_BATTERY_VOLTAGE // Enables battery-measurement via GPIO (ADC) and voltage-divider
//#define MEASURE_BATTERY_VOLTAGE // Enables battery-measurement via GPIO (ADC) and voltage-divider
//#define PLAY_LAST_RFID_AFTER_REBOOT // When restarting Tonuino, the last RFID that was active before, is recalled and played
//#define PLAY_LAST_RFID_AFTER_REBOOT // When restarting Tonuino, the last RFID that was active before, is recalled and played
@ -67,12 +67,16 @@
#define LOGLEVEL_DEBUG 4 // almost everything
#define LOGLEVEL_DEBUG 4 // almost everything
// Serial-logging-configuration
// Serial-logging-configuration
constuint8_tserialDebug=LOGLEVEL_INFO;// Current loglevel for serial console
constuint8_tserialDebug=LOGLEVEL_DEBUG;// Current loglevel for serial console
// Serial-logging buffer
// Serial-logging buffer
uint8_tserialLoglength=200;
uint8_tserialLoglength=200;
char*logBuf=(char*)calloc(serialLoglength,sizeof(char));// Buffer for all log-messages
char*logBuf=(char*)calloc(serialLoglength,sizeof(char));// Buffer for all log-messages
// File Browser
uint8_tFS_DEPTH=3;// max recursion depth of file tree
constchar*DIRECTORY_INDEX_FILE="/files.json";// filename of files.json index file