voroshkov / Chorus-RF-Laptimer

MIT License
184 stars 53 forks source link

[Feature Request] Serial Enhancement more API Messages (Race End, Pilot finished, target laps... etc.)) #100

Open El-Tonno opened 5 years ago

El-Tonno commented 5 years ago

Hi,

i added an esp8266 which is watching the serial output on the Chorus and publish the messages into a Wifi-Mesh. So other devices such as traffic lights, LEDs etc. in the mesh can react independently on the serial output .

Unfortunately some messages are missing. Would be nice if the serial output could be enhanced by the following states:

Thanks a lot Greets el-tonno

voroshkov commented 5 years ago

Hi,

Unfortunately these are not the things to be managed by Chorus device itself. These parameters are expected to be managed by the race control software, so you need to integrate with the latter to monitor the information you want. Chorus API just forwards the unknown commands through the chain, so any command not recognized by Chorus will be forwarded to your ESP.

El-Tonno commented 5 years ago

I see ... ok this was my little missunderstanding of the Chorus and the Chorus App architecture. I confess i`m not very good in apk developement. Now i had a look at the app src and i think RaceResultFragment.java would be right place.

Line 46 : AppState.getInstance().sendBtCommand("R*R1");

Could you please add just one line ?

something like that--> AppState.getInstance().sendBtCommand("LTG*" + String.format("%01X", LAPS_TO_GO) );

With the amount of laps i would be able to calculate the rest of the messages i mentoined above.

Thank you very much el-tonno

El-Tonno commented 5 years ago

Hi again ... i please you to help me :-) Don´t wanna recompile your app and building a derivate. This little additiononal message won´t hurt anybody ... and could be usefull in other projects. Please just implement this in your next version of the app. What do you think ?

voroshkov commented 5 years ago

Hi. Generally it's ok to do. But I'm out of time at the moment. Need about a week to return to this.

El-Tonno commented 5 years ago

Hi Thanks a lot ...would be nice if this is available in the next Version.

Meanwhile i made the changes myself ...

I added follwing line 47 at RaceResultFragment AppState.getInstance().sendBtCommand("LTG*" + String.format("%01X", RaceState.lapsToGo));

and made the the lapsToGo static for access public static int lapsToGo;

So no hurry :-)