Issue with updating torizon_gpu field in project's .vscode/settings.json for Toradex Verdin AM62

Hello,

for my C++/Qt Torizon project I am using Visual Studio Code with Torizon IDE extension version 2.8.1. There is a problem with proper updating of torizon_gpu field in project’s .vscode/settings.json file. On start of Visual Studio Code it will be always updated to an empty string, although my Toradex module “Toradex Verdin AM62 on Dahlia Board” requires the value “-am62”.
I have found a solution, please take it to the new Version of Torizon IDE Extension.

Solution:
There is a hardware table in ~/.vscode/extensions/toradex.apollox-vscode-2.8.1-linux-x64/out/utils/Consts.js on the end of the file:

exports.HARDWARE_MODEL_GPU_TABLE = [
    {
        has: "**AM**62",
        gpu: "-am62",
        platform: "-am62"
    },
    {
        // eslint-disable-next-line spellcheck/spell-checker
        has: "beagleplay",
        gpu: "-am62",
        platform: "-am62"
    },
    {
        has: "imx8",
        gpu: "-vivante",
        platform: "-imx8"
    }
];

The problem is that the “has” field in the first entry has the value “AM62”, but the comparison in the file ~/.vscode/extensions/toradex.apollox-vscode-2.8.1-linux-x64/out/utils/DeviceConnect.js is done in lowercase:

        for (const item of Consts_1.HARDWARE_MODEL_GPU_TABLE) {
            if (dev.Model.**toLowerCase**().includes(item.has)) {
                // return specific GPU prefix for downstream lib container
                if (_gpuRC === true) {
                    return item.platform;
                }
                return item.gpu;
            }
        }

So, it is enough to change it to lowercase:

has: "AM62";   ->   has: "am62";

Sincerely,
Robert Fabian

tdx-info:
HW model: Toradex Verdin AM62 on Dahlia Board

Greetings @rfabian,

Thank you for reporting this. That said this issue was already recognized and fixed internally. The fix was only a few weeks ago so it’s probably not available in the stable release of the extension yet. Which is why you still see the issue. The fix might be available in the early-access version of the extension.

Best Regards,
Jeremias