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>';
var socket = new WebSocket("ws://%IPv4%/ws");
var host = $(location).attr('hostname');
function connect() {
socket = new WebSocket("ws://%IPv4%/ws");
if(DEBUG){
host = "192.168.178.112";
}
}
function ping() {
var myObj = {
"ping": {
ping: 'ping'
}
toastr.options = {
"closeButton": false,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
};
var myJSON = JSON.stringify(myObj);
socket.send(myJSON);
tm = setTimeout(function () {
alert("Die Verbindung zum Tonuino ist unterbrochen!\\nBitte Seite neu laden.");
#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