Is it possible, may be via the GB, or another way, just to download a content from an URL?
Not at the moment, but in the future it will be added. IMO using the App Loader is the less complex solution though as it means a lot less duplicated code, and less stuff running on the wath slowing it down :)
@fanoush finding out when AGPS data is needed would be really neat. It would be handy to be able to flag to the user when an update would help - I wasn't aware it only lasted 4 hours - that's not ideal :)
setTimeout is not blocking current "thread"
In Espruino, there is just one thread. So if you're writing inline C code that puts the device to sleep and waits for an interrupt, lots and lots of things are going to start breaking (including handling Serial data from the GPS, which I think you care about).
You can upload Inline C from the IDE (it's just not supported via the App Loader yet - you have to include the precompiled blob). Basically you just need to do what you're doing and wait for the JS data event. If you want to go deeper you'll have to compile your own Espruino firmware, and even then you have to work within the framework that is available - which means not blocking execution unless absolutely required.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Not at the moment, but in the future it will be added. IMO using the App Loader is the less complex solution though as it means a lot less duplicated code, and less stuff running on the wath slowing it down :)
@fanoush finding out when AGPS data is needed would be really neat. It would be handy to be able to flag to the user when an update would help - I wasn't aware it only lasted 4 hours - that's not ideal :)
In Espruino, there is just one thread. So if you're writing inline C code that puts the device to sleep and waits for an interrupt, lots and lots of things are going to start breaking (including handling Serial data from the GPS, which I think you care about).
You can upload Inline C from the IDE (it's just not supported via the App Loader yet - you have to include the precompiled blob). Basically you just need to do what you're doing and wait for the JS data event. If you want to go deeper you'll have to compile your own Espruino firmware, and even then you have to work within the framework that is available - which means not blocking execution unless absolutely required.