voroshkov / Chorus-RF-Laptimer

MIT License
184 stars 53 forks source link

Send a message when a pilot checkbox gets clicked #103

Closed Smeat closed 5 years ago

Smeat commented 5 years ago

I am currently using multiplexing to track more pilots than the number of VRX modules available.

So I'd like to propose to send a message when a pilot gets activated or deactivated so the timer can adjust and reduce the accuracy loss. This could also be used to save power when there are fewer pilots than modules.

voroshkov commented 5 years ago

Thanks for your contribution, but this feature won't go to the official Chorus, sorry.

AlessandroAU commented 5 years ago

:( This would have been a great feature to allow for some future expandability and features

voroshkov commented 5 years ago

Sorry guys, but I consider using single VRx for tracking multiple pilots nearly useless, because it brings more problems than it solves. As for the API extension: Chorus doesn't know anything about pilots, it operates with attached module and its settings. So burdening it with knowledge about pilots' state is not right.

Smeat commented 5 years ago

Sorry guys, but I consider using single VRx for tracking multiple pilots nearly useless, because it brings more problems than it solves.

Totally understandable.

As for the API extension: Chorus doesn't know anything about pilots, it operates with attached module and its settings. So burdening it with knowledge about pilots' state is not right.

The scenario I had in mind would be: I have X chrous devices (8bit), but a variable amount of people < X (like people leaving, flying in two groups etc). Now if I have a rather limited battery life, my only option would be to disconnect the unused modules, which is not really practical if possible at all. My impression was that the "Pilot" page was more like a "more module settings" to set the threshold or disable the modules, since the function is already called "changeDeviceEnabled", so I thought this extension might fit well.

But you are right my wording was bad, rather than "pilot active" I meant "module active", sorry. Since there is a 1:1 relation, I used pilot and module interchangeably. I didn't want to introduce anything pilot or multiplexing related to your protocol.

Not trying to fight your decision, I just want to make my point clear in case I didn't explain the possible use case I had in mind properly.

voroshkov commented 5 years ago

@Smeat Got your point, thanks for the clarification. Still current Chorus schematic doesn't allow for physical turn off of the VRx module. Is it possible to do by software means via SPI? If it would really make power consumption noticeably less, that might make sense.

Smeat commented 5 years ago

Yeah if you power down all components (setting all values in the Power Down Control Register to 1), the module basically doesn't consume power (at 5V about 170mA less consumption). I don't have a switch either and just use this method. One thing I noticed though is, that you have to reset the module using the "State Register" to power it up again.

voroshkov commented 5 years ago

Thanks @Smeat. I still don't think it's a "must have" feature, however making Chorus "greener" is good :) I'd merge if you could create a full-fledged PR with both Arduino and Android app code changes. Thanks again!

Smeat commented 5 years ago

Fair enough. I made the changes, but still have to find an Arduino to test them (especially the SPI part), so it might take some time. Thank you for the possibility to have this in the main app!

voroshkov commented 5 years ago

Re-created the PR: https://github.com/voroshkov/Chorus-RF-Laptimer/pull/104