Comments (23)
Hi,
I started looking at the source code and to the many events that can be programmed but I am a bit overwhelmed :). this thing is really complex. does anyone have pointers how to get into the code base. And even better suggestions in how to implement this feature?
from xcsoar.
You could implement this as a small modal dialog (class WndForm
) which is displayed in one screen corner. It contains just one small "Unlock" button. That way, XCSoar shows the usual information, but does not respond to clicks (only to the "Unlock" button).
Once we have that, we can refactor it to an invisible overlay which requires the user to draw a gesture (dimming the screen, showing the gesture and instructions while the finger touches the screen). But let's do one thing at a time.
from xcsoar.
Oh and yes, one can easily be overwhelmed by the complexity of XCSoar. And its heavily underdocumented non-standard UI toolkit. I hope you have enough patience to get this done.
from xcsoar.
Thank you very much for the hints. I will look for references on the WndForm class and investigate further.
from xcsoar.
Any news on this front? I think it would be a very useful feature for any praraglider pilot.
LJK8000 has a feature that disables touch screen until the software detects the take off, but locking the scrren after a time out would be definitely more useful option.
from xcsoar.
I started to implement a feature like that in https://github.com/nico-krais/XCSoar/tree/ScreenLock. As suggested, there is a new button under "Display" that locks the screen, and only shows a very, very small OK button to return to normal operation.
I would much prefer to have it that a longer press on the button is required instead of making it very small, but couldn't figure that out by now.
Also, it would be very helpful to automatically unlock the screen at take-off - at least that would be my use-case.
If anyone with more experience in the code-base could point me in the right direction for the two points mentioned above, I would also have a look at that.
from xcsoar.
I now tested this successfully on my Kobo mini, it prevents exactly what @pqueiros described: That the risers trigger all sort of Inputs before take off. Until now I have not managed to unlock the screen unintentionally. The new menu item looks like this:
and after pressing the button you see
The current version of my implementation can be found here: https://github.com/nico-krais/XCSoar/tree/v6.8.11_patched
I based this on the v6.8.11 tag since this is the current release and I have that in production.
As mentioned above this is probably as far as I can go without some directions from a more experienced developer.
If this feature is of interest, I can prepare a merge request. Let me know if specific work should be done before.
If someone is interested in the meantime, I uploaded the version I use on my Kobo mini: https://github.com/nico-krais/XCSoar/releases/tag/v6.8.11_patched - WITHOUT ANY SORT OF WARRANTY, THIS IS BARELY TESTED, ASSUME THAT IT WILL DESTROY YOUR DEVICE AND AT THE VERY LEAST HAVE A FULL BACKUP OF YOUR SD CARD
from xcsoar.
I've just seen that there already exists a pull request for that, so it should be mentioned in this issue: #202
So I won't prepare the merge request for my implementation.
from xcsoar.
from xcsoar.
My implementation, the one in the (somehow embarrassing) pull request, uses a modal dialog like the one of Nico Krais, but I tailored it to be as small as possible and to put it in an area where it shouldn't cover anything important.
Lately I made a small change (the button acts now as a "cancel" instead of "OK") and that brought in the unexpected ability to close the modal also by pressing the hardware "power" button!
If you want to try it out, here attached is an updated KoboRoot.tgz, but use it at your own risk, I'm not responsible if it bricks your device, raids your fridge, kills your dog and so on...
unzip_me.zip
from xcsoar.
I prefer to lock the screen permanently, while I am flying with the paraglider. So it is impossible that my jacket push on the screen from my kobo. When I lock the screen, I can see the „Screenlock“ and „Anzeige 3/3“ Buttons. It would be nice, when only a very small Button to unock was visible. Thanks
Yea, the file I uploaded was from an old commit - it's updated now. Also the dialog is smaller. But again, since there is the pull request by @ulipo, the smartest thing is to wait for that to get merged and officially released.
from xcsoar.
If I lock my screen on kobo, there is no thermal asstistant on the left bottom corner. If I unlock the creen, the asstistant is visible in cycling mode. I testet it in replay and while I am flying.
from xcsoar.
I guess the thermal assistant is done as another dialog window or such, probably it's queued to the modal window of the lock screen and isn't displayed until the first one is closed.
The same happens for the messages, they are all displayed in a row when you unlock the screen.
I am not skilled enough to know how to circumvent this, I am afraid for the time being you'll have to choose to have either the screen locked, or the other functions...
from xcsoar.
Thank you. It is possible to use an event.xci? Do you know the syntax for thermal asstistant window?
from xcsoar.
I'm sorry, I totally don't know
from xcsoar.
I tried the thermalAsstist.xci
Switch automatically to Thermal Assist screen when thermalling, switch back to previous screen when not.
Copy thermalAssist.xci to XCSoarData
Start XCSoar goto:
Config 2/3 -> System -> Look -> Language, Input
Select Events then thermalAssist.xci
Restart XCSoar
mode=default
type=gce
data=FLIGHTMODE_CLIMB
event=ThermalAssistant
event=Mode default
mode=default
type=gce
data=FLIGHTMODE_CRUISE
event=ScreenModes previous
event=Mode default
It works an make the ThermalAsstistant visible, also if the screen ist locked. But I would prefer the small ThermalAssistant in the left bottom corner. So I would see my flight track. The thermalAssit.xci I found from Lloyd on the internet.
from xcsoar.
Am I missing something obvious here. I've tried to update my build on kobomini using all of the KoboRoot.tgz files above. none of them show the menu item DISPLAY3/3 > Screen Lock. After updating my kobo shows a new version number so it seems like it's loading the files ok.
I would love to have this feature. I'm always having to reset stuff mid flight because all of the unintentional buttons pushed.
from xcsoar.
If you use my build from the "unzip_me.zip" file I posted above, the lock screen button is in the main menu, not in DISPLAY.
from xcsoar.
Huh, i've loaded up your build. I'm still not seeing a lock screen button. I see the build number on startup as 'v7.0_preview14-kobo'
from xcsoar.
That's strange, the button should be just on the left of "Cancel" in main menu, I already tried it on a Mini and I'm sure it was working...
Try this other build here, it's the one I'm using on my Kobo Glo and includes also the OTG kernel (but I didn't test that on Mini)
KoboRoot_XCsoar_OTG_LOCK.zip
As always, take a full backup of your SD card before trying stuff, or anyway don't hold me responsible if your Kobo blows up in chippings 😁
from xcsoar.
It is strange. That one isn't showing the button either. Maybe I need to do more with the install? I'm just putting the .tgz into the kobo folder, but not erasing anything. Do you think erasing the existing xcsoar and then installing fresh would help?
Thanks for the development on this btw 😁, I've been wanting this feature for a long time.
Do I need to do something with an XCI file?
from xcsoar.
Yes. Problem solved. I had a default.xci file overriding the menu display. I removed it and the lock screen now works as described!
from xcsoar.
This is implemented in preview15
from xcsoar.
Related Issues (20)
- Windows build is broken HOT 10
- Data folder writable from another app HOT 10
- LXNav S10 incorrect ballast synchronization HOT 30
- Crash in task wind calculation - Angle::AsBearing() assertion (v7.40, Android) HOT 2
- XCSoar connectivity to LXNAV S100 intermittent HOT 9
- Saved tasks show as empty tasks when loading HOT 8
- make error v7.42 (master) RuntimeError: Digest mismatch HOT 1
- .CUP file with 499 or more lines fails to load HOT 5
- XCSoar crashes when loading cup files, larger than 1000 waypoints HOT 4
- Display of multiple images= with details.txt HOT 2
- Error while building for Android/IOS HOT 1
- XCSoar 7.40 @ Kobo: Iso8859-1 Charset forWaypoint HOT 7
- Version 7.x no longer accepts 'ft' in the waypoint elevation data in .cup files HOT 3
- xcsoar hosting - relocating from AWS HOT 18
- OpenAir extended format: use AY indication for colouring with AC UNCLASSIFIED HOT 14
- P and R airspace are not managed properly HOT 3
- Crash on start: android cache dir not found HOT 4
- Forum: Performance is low was: No posts / replies possible HOT 10
- WIN64: TestAirspaceParser.exe fails HOT 2
- Windows: Task file produced by XCSoar contains invalid values in XML attributes HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcsoar.