master
Gordon Williams 2021-02-11 11:29:01 +00:00
parent b794059884
commit 4a452f86b7
1 changed files with 14 additions and 1 deletions

View File

@ -84,7 +84,20 @@ has been configured:
require("gpssetup").setPowerMode().then(function() { require("gpssetup").setPowerMode().then(function() {
Bangle.setGPSPower(0); Bangle.setGPSPower(0);
}); });
``` ```
**Note:** It's not guaranteed that the user will have installed the `gpssetup`
app/module. It might be worth checking for its existence by surrounding the
`require` call with `try...catch` block.
```
var gpssetup;
try {
gpssetup = require("gpssetup")
} catch(e) {
E.showMessage("gpssetup\nnot installed");
}
```
## References ## References