You can now have INFO output, but not DEBUG output. Added support for commands via Serial.

This commit is contained in:
2019-08-09 06:27:33 +02:00
parent 417421ae31
commit 842d7becf0
5 changed files with 204 additions and 95 deletions

View File

@ -15,6 +15,10 @@ private:
uint32_t _last_rfid_card_uid = 0;
Player* _player;
unsigned long _last_rfid_scan_at = 0;
String _serial_buffer = String();
void _execute_serial_command(String cmd);
void _execute_command_ls(String path);
void _execute_command_help();
public:
Controller(Player* p);
void loop();

View File

@ -34,6 +34,7 @@ private:
uint8_t index;
uint32_t position;
};
void _check_system_sound(String filename);
void _reset();
void _init();
void _wait();
@ -45,7 +46,8 @@ private:
void _refill();
bool _refill_needed();
void _flush_and_cancel();
void _flush(uint bytes);
int8_t _get_endbyte();
void _flush(uint count, int8_t fill_byte);
void _set_last_track(const char* album, uint8_t track, uint32_t position);
std::map<String, album_state> _last_tracks;
void _play_file(String filename, uint32_t offset);
@ -64,8 +66,9 @@ private:
uint8_t _buffer[32];
String _playing_album;
uint8_t _playing_index;
uint8_t _playing_album_songs;
uint32_t _current_play_position;
uint _refills;
int8_t _end_byte;
uint8_t _volume;
uint16_t _stop_delay;
uint32_t _skip_to;
@ -82,4 +85,5 @@ public:
void stop();
bool loop();
void set_volume(uint8_t vol, bool save = true);
std::list<String> ls(String path);
};