Notices


Reply
Thread Tools
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#151
Here's a possible fix. Try if that works. You can just edit that small change into the installed file under /usr/share/harbour-whogo-maps.

https://github.com/otsaloma/whogo-ma...92b6aa005ee8fa
 

The Following 4 Users Say Thank You to otsaloma For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#152
Originally Posted by pichlo View Post
I've been thinking about a one-liner too. Something along the lines of...
Code:
ps aux | grep whogo* | cut -d " " -f 2 | xargs kill -9
(Caveat: not tried yet.)
I had some problems with cut. I could not convince it to use multiple spaces as a single delimiter. So I had to expand the line a bit but it seems to work now:
Code:
ps aux | grep whogo | grep -v grep | grep -v sh | sed -e "s/\s\{1,\}/ /" | cut -d " " -f 2 | xargs kill
It is tested and it works (yes, I had to trigger the issue again to test it but that part was easy).

What it does:
  • ps aux lists the running processes;
  • The first grep filters out only those processes with "whogo" anywhere in the command line that started it - be it in the name or arguments;
  • The second grep eliminates the grep process itself from the results;
  • The third grep is only useful if you use the attached script - it eliminates the grep script itself from the results;
  • sed merges multiple spaces into a single space;
  • cut splits each line of output into fields, using a space as a delimiter and letting only the second field (the one containing the process ID, or PID) through;
  • xargs collects the output (which by now is a few lines, each containing just the PID of a WhoGo process) into an argument list for the kill command.

I am attaching the line as a script. Copy it into /home/nemo, remove the .txt extension (I had to add it to pacify the TMO uploader) and run from the command line like this:
Code:
sh whogo-kill
Or add the execute permission and run it like this:
Code:
./whogo-kill
Attached Files
File Type: txt whogo-kill.txt (116 Bytes, 57 views)
__________________
Русский военный корабль, иди нахуй!

Last edited by pichlo; 2018-07-09 at 12:00. Reason: Typo: anywhere -> anyway. D'oh!
 

The Following 3 Users Say Thank You to pichlo For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#153
Originally Posted by otsaloma View Post
Here's a possible fix. Try if that works.
Oops, I was too slow. Or you were too fast. After all, you said you were not going to waste spend time on this in the near future

Thanks, I will give it a try and let you know.
__________________
Русский военный корабль, иди нахуй!
 

The Following 3 Users Say Thank You to pichlo For This Useful Post:
Posts: 292 | Thanked: 294 times | Joined on Jan 2012 @ Milan, Italy
#154
Not sure if this is related, but I've been recently experiencing something similar (GPS icon in my status bar with no GPS application currently running, but only after having used one). Thing is, it happened when using Here WeGo (the android app installed from the official Jolla store a.k.a. harbour, not any of the available android stores). I'm using an Xperia X with official Sailfish X license, latest OS installed.

Maybe there is something system related triggering this, and it is not a WhoGo specific issue?
 

The Following 4 Users Say Thank You to Watchmaker For This Useful Post:
nthn's Avatar
Posts: 764 | Thanked: 2,888 times | Joined on Jun 2014
#155
Originally Posted by pichlo View Post
I had some problems with cut. I could not convince it to use multiple spaces as a single delimiter. So I had to expand the line a bit but it seems to work now:
Code:
ps aux | grep whogo | grep -v grep | grep -v sh | sed -e "s/\s\{1,\}/ /" | cut -d " " -f 2 | xargs kill
It is tested and it works (yes, I had to trigger the issue again to test it but that part was easy).

What it does:
  • ps aux lists the running processes;
  • The first grep filters out only those processes with "whogo" anywhere in the command line that started it - be it in the name or arguments;
  • The second grep eliminates the grep process itself from the results;
  • The third grep is only useful if you use the attached script - it eliminates the grep script itself from the results;
  • sed merges multiple spaces into a single space;
  • cut splits each line of output into fields, using a space as a delimiter and letting only the second field (the one containing the process ID, or PID) through;
  • xargs collects the output (which by now is a few lines, each containing just the PID of a WhoGo process) into an argument list for the kill command.

I am attaching the line as a script. Copy it into /home/nemo, remove the .txt extension (I had to add it to pacify the TMO uploader) and run from the command line like this:
Code:
sh whogo-kill
Or add the execute permission and run it like this:
Code:
./whogo-kill
I don't know what the 'invoker' process is responsible for, but going by the name I'm assuming it isn't the one hanging in the background, so in that case I think you've just created a very complicated way of doing:
Code:
pkill harbour-whogo-maps
Props regardless!
 

The Following 5 Users Say Thank You to nthn For This Useful Post:
pichlo's Avatar
Posts: 6,447 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#156
Originally Posted by nthn View Post
I don't know what the 'invoker' process is responsible for, but going by the name I'm assuming it isn't the one hanging in the background, so in that case I think you've just created a very complicated way of doing:
Code:
pkill harbour-whogo-maps
Oh. I had not tried pkill. I tried killall which of course did not work.

While on the topic of trying... sorry otsaloma, your one-line fix on github did not do the trick Same issue again on my drive home from work. About 40 minutes, including a fuel stop.

Oh, and for some reason my script did not work either. The same command executed directly from Terminal did. Curiouser and curiouser.
__________________
Русский военный корабль, иди нахуй!
 

The Following 6 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#157
I have been working on incorporation of map matching info and navigation screen for driving by car. I am quite sure the same can be used for cycling as well.

As mentioned earlier, map matching, in addition to snapping position to the road network, gives current speed limit, street name, direction. While current implementation of hooking map matching is rather primitive and only good for testing it, I have been rather pleased with the results. Snapping to the road works quite well, speed limits in many places (NB! not all) are accurate, street names are well detected.

I looked around on how this info can be shown and tried to piece something together, as shown on attached screenshot. Here, menu button is replaced with speed/time to destination/distance to destination. That rectangle if clickable, as the one above. On top, the current road or street is shown, if detected. The map was blown up by using scaling 2x in the preferences and was rather nice to use while driving (normally I use it at 1x).

As you can see, I miss proper speed limit sign (anyone to chip in?). Right now its just shown in red. The other elements were shifted out of the way, for testing the other elements. While driving, I was missing ETA, would like to add it (top right?). North arrow and scale were actually useful to have, so would like to keep them too. As for fancy speed widget, not sure where (or if) to fit it.

All in all, its early days and with this work I mainly wanted to get the feedback and ideas/schemes on how to proceed. Then we would have to figure out how to integrate different modes of operation into WhoGo Maps, but that would be easier if there is a working prototype.

I am planning to work on map matching further and expose it properly. After that, would like to come back and work on the car navigation mode.
Attached Images
 
 

The Following 8 Users Say Thank You to rinigus For This Useful Post:
karlos devel's Avatar
Posts: 137 | Thanked: 392 times | Joined on Mar 2013 @ Guate
#158
look like landcape mode will more afected on visibilty.
 

The Following 2 Users Say Thank You to karlos devel For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#159
Originally Posted by karlos devel View Post
look like landcape mode will more afected on visibilty.
Forgot to mention it - I am sure we will have to design separate landscape and portrait modes. I am used to portrait now, so started there.
 

The Following 3 Users Say Thank You to rinigus For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#160
If feasible, I would let the user decide if showing the scale and the north arrow; they may be useful to some and not to someone else.
(What's the C symbol? Copyright? )
Good job!
 

The Following 3 Users Say Thank You to claustn For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:14.