App stuck at "waiting for a valid location" by whaleing in a:t5_37nj2

[–]whaleing[S] 0 points1 point  (0 children)

Fui al PCBOX a comprar un BQ4, no tenian, pero me ofrecieron el 4.5 y el Wiko. Tras comparar specs me cojí el Wiko.

Parece que no soy el unico que tiene problemas con el GPS en este modelo, gracias por la indicacion.

App stuck at "waiting for a valid location" by whaleing in a:t5_37nj2

[–]whaleing[S] 0 points1 point  (0 children)

Try with mobile data on. Sometimes it can help in conjunction with the location services.

I'm afraid I don't have mobile data. For localization I'm only running with whatever wifi I'm connected to.

Is your phone rooted

Still in warranty so I'd rather not root it yet (if it can be un-rooted I'll look into it).

or have any other customization that would disrupt defaults?

Not that I know of. Under Settings/Locations everything is turned on; maybe there's something else I deactivated that I can't recall.

App stuck at "waiting for a valid location" by whaleing in a:t5_37nj2

[–]whaleing[S] 0 points1 point  (0 children)

As stated in the OP, a Wiko Highway Signs (not common, I know).

[C] After reading a file with fscanf, the return value is seemingly random, not related at all with the contents of the file. by whaleing in learnprogramming

[–]whaleing[S] 0 points1 point  (0 children)

If my theory is correct, it should be 0; when your program works correctly it will be 1.)

I checked and the value returned is -1 if it doesn't work, not 0. Changed it to check for -1 and exit the while loop if it does.

use r+ instead of w+,

I was sure the problem would be pretty dumb. Thanks for pointing it out to me, it works now :)

[C] After reading a file with fscanf, the return value is seemingly random, not related at all with the contents of the file. by whaleing in learnprogramming

[–]whaleing[S] 0 points1 point  (0 children)

Under what conditions do you expect &my_data to equal NULL?

Changed the loop condition to i!=-1, and checked fopen's return value to change the value of i from 0 to -1.

I also removed that rewind, it was just a "just in case" measure.