warmsound / crystal-face

Garmin Connect IQ watch face
https://apps.garmin.com/en-GB/apps/9fd04d09-8c80-4c81-9257-17cfa0f0081b
GNU General Public License v3.0
381 stars 124 forks source link

Feature request: Add Pulse Ox as a data field #180

Open SylvainGa opened 3 years ago

SylvainGa commented 3 years ago

Thanks

BTW, I translated the strings to French. Do you want me to send a pull request?

SylvainGa commented 3 years ago

Hi, I've fork a copy of the code and added the following code to getValueForFieldType(type) (plus relevant strings, fonts and PNG for the Venu) and it seems to be working but the simulator has its limitation...

enum /* FIELD_TYPES */ {
:
    FIELD_TYPE_PULSE_OX // SG Addition
:
:
    private function getValueForFieldType(type) {
:
:
        switch (type) {
            // SG Addition
            case FIELD_TYPE_PULSE_OX:
                activityInfo = Activity.getActivityInfo();
                sample = activityInfo != null and activityInfo has :currentOxygenSaturation ? activityInfo.currentOxygenSaturation : null;
                if (sample != null) {
                    value = sample.format(INTEGER_FORMAT);
                }
                break;

If you give me the permission to do a pull request, I could send you the changes. I'm willing to help if you let me :-)

SylvainGa commented 3 years ago

Figured out how to sideload, it's working :-)

https://i.imgur.com/OcIJvq2.jpg

warmsound commented 3 years ago

Hi @SylvainGa, you should be able to create a pull request from your fork, back into the main repo.

It would be great if you could create a pull request for the French string translations - thank you.

The changes for the Pulse Ox would also be great. We'll need to check that the icon is available in all required sizes for the different watches that support it. Ideally, we should then only offer the setting for those watches.

SylvainGa commented 3 years ago

Great, thanks. Seeing there was no movement since late 2019, I was afraid this repo was now orphaned. Glad to see it isn't :-)

I already did the icon in all the required sizes. I'll try to upload later today or tomorrow.

I've also modified the AlwaysOn display to remove the bold hour font and added a colon between the hours and minutes (added the colon to the minute font) and reduced the line thickness from two pixels to one so there are less pixels on in that mode.

This is what it looks like. Let me know if you want it too.

https://imgur.com/a/V6NpTVB

SylvainGa commented 2 years ago

I've uploaded a version here where this is has been added.

https://apps.garmin.com/en-US/apps/cfdfdbe4-a465-459d-af25-c7844b146620