Massive changes. Added a quite nice webinterface with live data using WebSockets. Removed the FTP server (wasn't that useful anyways). JSON creating using ArduinoJson instead of String concatenation. Ans, and, and.

This commit is contained in:
2019-11-16 23:03:13 +01:00
parent 0cddfaf0d9
commit 7c3eb2f605
22 changed files with 625 additions and 2809 deletions

View File

@ -1,25 +1,32 @@
#pragma once
#include <Arduino.h>
#include <vector>
#include <ArduinoJson.h>
class Playlist {
private:
uint32_t _position = 0;
uint32_t _current_track = 0;
bool _started = false;
bool _shuffled = false;
std::vector<String> _files;
public:
Playlist(String path);
void start();
bool has_track_next();
bool has_track_prev();
bool track_next();
bool track_prev();
void track_restart();
bool set_track(uint8_t track);
void reset();
bool is_empty();
String get_current_file();
uint32_t get_position();
void set_position(uint32_t p);
void shuffle(uint8_t random_offset=0);
void advent_shuffle(uint8_t day);
bool is_fresh();
void dump();
void json(JsonObject json);
};