Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
El-Tonno opened this issue Feb 24, 2019 · 5 comments

Comments

@El-Tonno
Copy link

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:

  • amount of Laps have to be done ( at race start.. before R*R1 for e.g.)
  • information pilot has finished the last lap (after S0L5XXXXXX)
  • race finished (all pilots have finished the last lap)
  • direct feedback if the amount of laps is changed in the app (like the feedback ignore 1st lap R11/R10)

Thanks a lot
Greets el-tonno

@voroshkov
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

El-Tonno commented Mar 2, 2019

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
Copy link
Owner

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
Copy link
Author

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants