What is this StandardFirmata_ModifiedAll code doing?

Hmmm, if Firmata sketch waiting for user instruction, then If I insert my code (to drive 4 digits 7 segments by detecting things pass by the sensor, timer using millis) then it should not slave anymore, am I right?

So here I explain what I do:
Now I have been able to drive 4 digits 7 segments as counter (using IR sensor) and timer (using millis), I have build the hardware also the code, it has start/pause button, it works well..

But now I would like to control it not only using manual button, but control it by using PC, that's why I look for GUI.
I decide not to create the GUI since I have no experience on that.
Then I find Firmata GUI, then I try to upload StandarFirmata sketch and it works well ( I test with pin 13),
then I think I see hope to control everything on my Arduino and also get the variable on the Arduino to put it in my database.

I hope this is clear.

Vielen Dank!