-
@HughB @halemmerich To use the gps data from Gadgetbridge, you need to activate it in the settings of the Banglejs device of the Gadgetbrdige as well as in the settings of the "Android" app on the banglejs device. The default values are set to false, so it is not possible to accedentily activate this feature.
Also @halemmerich, another advantage of the gps data from the Gadgetbridge is that we can use the GPS data of the current network (which is not possible on the bangle device). Therefore we can get gps data, even if ther is no connection to any gps sateliets.
-
I found some bugs in the Gadgetbridge app aswell as in the "Android" app on the banglejs device.
The bug on the Gadgetbridge was, that the GPS_PROVIDER when the NETWORK_PROVIDER should have been used to get the gps data. Therefore the GPS data wasn't updated if you don't have a connection to some GPS sattelites. I fixed it and you can find the PR here
The bug on the Banglejs "Android" App was that the received data was published on the "gps" event. However the normal event used by the build in gps chip is the "GPS" event. I changed therefore the event to match the event used by the build in gps chip.
Also, the retrieved JSON object form the Gadgetbridge contained the longitude value under the key "long". To match the object structure of the gps data comming from the gps chip(which uses the key "lon"), i added a mapper to map the longitude correctly. You can find the PR for that hereIf you have time please take a look. @Gordon if it is not to late i would suggest to wait until the fix of the Gadgetbridge app is merge before releasing a new version of the Banglejs-Gadgetbridge app, so that this fix is also included.
-
-
-
-
I added the extra load between the drawString methods but with no success.
I did some extra testing and i found out that it dose not happen for every widget. I had the widget "A Battery Widget (with percentage)" and it happend there after the redraw.
It also happened with the widget "Calendar Widget", but it didn't occure witht the widgets "Battery Level Widget (Vertical)", "Battery Level Widget (with percentage)", "Battery Level Widget" or "Bluetooth ID Widget".However i mangaed to reproduce the same error with a simple
E.showMessage()
command.
Here is the example code
g.clear(); g.drawString("hi this is a long sentence", 0,0); E.showMessage("This is a test"); g.setFontVector(10); g.drawString("hi this is a long sentence", 0,0);
I noticed there, that the font size of the text was changed to that of the shown message. But even if i set it to a lower one, it is still moved to the left.
-
Hi everyone,
when i run into a error, that the coordinate system moved when i load the widegets with
Bangle.loadWidgets()
Before i run this line, i can draw a string at 0,0. If i run the same draw command after i loaded the widegts the string is moved to the top left out of the screen. Do you know what the problem could be?
Here is an example code.
g.clear(); g.drawString("hi this is a long sentence", 0,0); Bangle.loadWidgets(); g.drawString("hi this is a long sentence", 0,0);
-
-
I had to repoen the Gadgetbride PR, since i broke the previous one by updating my branch. Do i have to do anything to merge it, or can only the maintainer merge the PR?
-
Hi,
the initial PR got broken so here is the new Gadgetbridge PRAnd here is the PR for the android intergration app
Please take a look if you have time.
Thank you -
-
-
Hi,
i had time this weekend and implemente a possible way to send the gps position. I send it as a "gps" event. How can i now use it on the banglejs device, do i have to adjust the android integration app aswell or is it handled automaticly?If you want have a look at the code, you can find it here. I have currently the problem, that the LocationManager dose not return the count of satellites or the current course(at least i didn't find a getter for that), so i set them to zero. I also send an extra flag to show that the gps data comes from an external source.
-
Hi everyone,
when i try to set the project path in the web IDE, with the "Select directory for Sandbox" nothing happens and in the web console i get the errorUncaught TypeError: Cannot read properties of undefined (reading 'chooseEntry') at HTMLButtonElement.<anonymous> (index.js:129798:25) at HTMLButtonElement.dispatch (index.js:4627:9) at elemData.handle (index.js:4295:28)
This error occures in the version 0.76.2, but not in the version 0.76.1.
I use both versions on Windows in a chrome browser.Do you have an idea what the problem could be?
-
@Gordon do you have an idea when this could be implemented?
-
-
Hi everyone,
i was looking into the GPS of the Banglejs 2 and it seems like it uses alot of energy if in use. I was wondering if it would be possible to get the GPS data through the gadgetbridge, since the phone has the needed battery capacity and a good enough GPS position?
Also, it looks like that the Gadgetbridge already collects location data.
-
-
@ReiScarlett do you have still the issue or is it just me?
-
I tried it with the headers "Authorization", "authorization" and "test" and i got always the UnsupportedOperationException.
Here a code to test it. You maybe need to create the endpoit, for that go to the page "https://ptsv2.com" and there you can create you a new endpoint.const http = require('http'); setWatch(() => { E.showMessage('Start sending'); Bangle.http(`https://ptsv2.com/t/bangleDump/post`, { headers: {test: 'Basic dGVzdDp0ZXN0'}, method: 'POST', body: JSON.stringify({test: 1}, null, 2) }).then((response) => JSON.parse(response.resp)).catch((err) => { E.showMessage('fail ' + JSON.stringify(err)); return Promise.reject(err); }).then((res) => { E.showMessage('Send Success'); }); }, BTN1, {repeat: true, edge: "falling"});
-
-
-
Hi evereyone,
i currently try to create a scrolling, where i can scroll the screen up and down with my finger. I found the g.scroll(x,y) method, this however deletes every pixel that leaves the screen.
I tried to use the drag event to move the position of my objects to draw every time a drag event is being emitted. This however causes jumps between each render, if there are more objects that need a redraw.
Is there a way to have a smooth scrolling with many objects?An code example with both scrolling methods. You can change the scroll method with the press of the hardware button.
let smoothScrolling= true; let y = 30; let numberOfObjects = 50; function render() { g.clear(); g.setFontVector(20); if (smoothScrolling) { g.drawString('Smoot', 50,30); } else { g.drawString('Own implementation', 50,y); } for (let i = 0; i< numberOfObjects; i++) { g.fillRect(10, y, 20, y + 10); } } const onDrag = (e) => { if (smoothScrolling) { g.scroll(0, e.dy); } else { y += e.dy; render(); } }; Bangle.on('drag', onDrag); setWatch(() => { smoothScrolling = !smoothScrolling; y = 30; render(); }, BTN1, {repeat: true, edge: "falling"}); render();
-
I just found a commit of @Gordon which adds the functionality of headers and post requests https://github.com/gfwilliams/Gadgetbridge/commit/4cd53fa9b64fa668960e27b03fed07edb7237240 . So it looks like it will be possible in the future, when the new release is published.
I forgot to add the "long-lon" mapping in that pr and it is already merged.
I created a new one for this change https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3019