Old account at https://lemmy.ml/u/qaz

  • 9 Posts
  • 21 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle







  • I didn’t use -Werror but no warning about it showed up either. The project uses a semi-custom toolchain for a microcontroller, but I’m not using it to compile this code. I have another file with an entrypoint which tests some classes to be used by the microcontroller. The EEPROM in the code example is actually a macro for a class I’ve written that emulates the EEPROM library by writing and reading to a file on disk.

    It’s a bit of a mess but this dual toolchain setup seemed easier than emulating the board and peripherals in it’s entirety. I might have to retry that though using Wokwi.


  • It’s on the company computer, but I have a backup from earlier today that seems to have the same code.

    bool load_metadata() {
        uint8_t marker_field = EEPROM.read(0);
        // Write to ROM if marker has not been set
        if (marker_field != MARKER) {
            metadata = {
                0,
            };
            EEPROM.put(1, metadata);
            EEPROM.update(0, MARKER);
        }
        else {
            EEPROM.get(1, metadata);
        }
    }
    

    I have to admit, my experience with C++ is rather limited, last Monday was the first time in my life that I used a C++ compiler. I had some issues getting it to work with Visual Studio, so I ended up using VS Code WSL with clang 😅.










  • I agree that it’s silly to package your app as a website with a browser but what other options do you have? GTK is difficult to get working on Windows, wxwidgets requires installing libraries on every system and Qt is either paid or LGPL. The only real crossplatform options seem to be Flutter and some .NET frameworks.



  • qaz@lemmy.worldtoProgrammer Humor@lemmy.mlfuuuuuuuuuuture
    link
    fedilink
    arrow-up
    41
    ·
    edit-2
    1 year ago

    Last time I checked the version Electron used by Discord was severely out of date causing several issues that had been solved months ago upstream. That’s the fault of Discord, not Electron but there are several issues with Chromium that I have to deal with on every Electron app I use. Compose sequences are still partially broken. I reported it at Chromium but they responded with a video of them testing it on Windows (not with a VM), said they couldn’t reproduce the issue (with a Linux specific input method?!) and then marked it as unreproducible.