-
Notifications
You must be signed in to change notification settings - Fork 8
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
Volume and Polar #35
Comments
Maybe it should simply remember the last-set volume? "Pushing on startup" is brittle, because you don't know if anything is actually listening for your "pushes" at that moment in time. Also, xcsoar has no idea when that "something" restarts and loses data it has "pushed". |
I agree with you about the "actually listening" problem. I feel like it would be nice to re-write the interface between variod and xcsoar to get an acknowledge as well as a few additional functions, but that's a bit beyond the scope of this at the moment. Any thoughts on how to "remember" the last-set volume, but I don't want to write on every volume change. Maybe a write on shutdown, but that would rely on a signal which likely won't happen. The main thing I was wondering is if there should be a variod.conf parameter, because there isn't one now. |
Why not? |
Isn't that hard on the FLASH? |
It shouldn't be. XCSoar does a write every second (or so). Also, OS typically buffers writes, so that they don't happen immediately on request. |
This #19 addresses the issue for Polar (but not for Volume). Here is what happens between variod and XCSoar when variod starts after XCSoar is up and running: To address Volume setting: NB: Variod may send multiple request for information in one sentence. |
I'm good with that solution. What needs to be done to make that happen? Does something need to happen in XCSoar as well? As a side note... And I didn't read through the entire ticket, I'd like to suggest the following: Any control messages (in either direction) should be acknowledged. If an acknowledgement isn't received the sender should re-send periodically. Secondly, there should be an "ping" command, as well as a: "I"ve just started up, configure me" command that variod should send to XCSoar. In this way, if variod crashes and is restarted during flight, XCSoar will know that it needs to be re-configured and can push the new configuration. It can also potentially check on variod and restart it if necessary, Only commands should be acknowledged though, otherwise it's just too much traffic. |
both sides need some work. For XCSoar it starts in Device/Driver/OpenVario.cpp
Disagree! What would you gain?
There is no need for a "ping". |
A ping function would allow (optionally) for XCSoar to act as a watchdog for variod if variod went off the rails, allowing it to kill the job. Once killed, the OS should automatically re-spawn it, at which point it would ask for configuration info and get reconfigured by XCSoar. As for why do we need "acknowledgements?" One obvious example would be if variod boots first and asks XCSoar to configure it, but XCSoar isn't ready to go, so it never sees the request. Again this just seems like good practice. Control messages should be pretty infrequent. |
There are better ways to implement a watchdog timer.
XCSoar sends polar, ballast, McReady, etc. when it starts and these values are already known. It sends these values every time they change. Why should XCSoar care if someone is listening?? |
Looking at the code, it appears that volume always starts up at 50% and XCSoar cannot command a particular volume, only up/down 10%. There is no way to override this in the config file. It seems like this should be configurable in the variod.conf file but isn't.
It also seems like XCSoar should push a specific value (not just up/down) on boot up or whenever the volume is changed. I'm not sure if XCSoar has a different volume level for the vario versus everything else. Similarly, should XCSoar be pushing the polar information into variod on startup?
The text was updated successfully, but these errors were encountered: