Start rfid after the audioplayer to make the rfid callbacks work.

This might bread events from the audio-hardware.
This commit is contained in:
Simon Weidacher
2021-12-26 14:00:30 +01:00
parent 93cced767f
commit dffa2e6205

View File

@@ -18,11 +18,12 @@ void app_main(void) {
networking.connectWifi(); networking.connectWifi();
webInterface.start(); webInterface.start();
rfid.start();
rfid.registerWebResources(&webInterface); rfid.registerWebResources(&webInterface);
webInterface.finishResourceRegistrations(); webInterface.finishResourceRegistrations();
AudioPlayer audioPlayer; // initialize here, because the ctor does init stuff that fails when executed before `app_main()` AudioPlayer audioPlayer; // initialize here, because the ctor does init stuff that fails when executed before `app_main()`
audioPlayer.play("file://sdcard/howcanwehangontoadream.mp3"); audioPlayer.play("file://sdcard/howcanwehangontoadream.mp3");
rfid.start();
} }