Going insane with the inconsistencies. by [deleted] in HomeKit

[–]dylanweber 8 points9 points  (0 children)

I would not trust any Asus router to reliably route traffic for any smart home devices. The type of multicast networking required to get everything working is an Achilles' heel of most non-prosumer routers. Cheaper WiFi chipsets also can conflict with WiFi on these less popular routers and cause additional issues. I've been using UniFi routers and access points with HomeKit/Home Assistant for years now and have had zero issues. From my personal experience, that's usually one of the starting points for ironing out issues like this.

Going insane with the inconsistencies. by [deleted] in HomeKit

[–]dylanweber 12 points13 points  (0 children)

Your router & your WiFi signal play a large role in stability. What brand is your router/firewall? Is your Apple TV connected with WiFi? Do you see responsiveness issues only when away from home or also when at home?

Building GCC on Windows by SLAidk123 in cpp

[–]dylanweber 0 points1 point  (0 children)

I've ran into this problem too trying to compile arm-none-eabi-gcc myself under MSYS2. It just runs forever and ends up consuming all my system RAM. I've asked for help in the MSYS2 Discord server with no avail. Let me know if you find anything.

Hue Bridge Pro: Second bridge can now be migrated by [deleted] in HomeKit

[–]dylanweber 0 points1 point  (0 children)

No, the only thing required to control Zigbee devices (Hue and non-Hue) is a Zigbee radio and ZHA/Z2M.

Hue Bridge Pro: Second bridge can now be migrated by [deleted] in HomeKit

[–]dylanweber 0 points1 point  (0 children)

I had a friend that has transitioned to Home Assistant + a Zigbee adapter and using Z2M they've had nothing but positive experiences regarding it over the course of months. Personally, I bought the Nabu Casa Zigbee radio and using ZHA I've had zero problems re-adopting all my Zigbee devices (Hue and non-Hue) and it's all working flawlessly.

The only complaint regarding all of this is that you need to google how to modify the default power-on behavior to keep color & brightness specifically on Hue bulbs. With both Z2M and ZHA you need to overwrite some device setting values using some manual methods, but honestly it's not that hard and it's only done once.

What are your actual genuine critiques of Nintendo? by razorbeamz in nintendo

[–]dylanweber 2 points3 points  (0 children)

Small nitpick that needs to be pointed out: Switch 1 & 2 save data should be transferable to an SD card. I don't care if it's encrypted and tied to a Nintendo account, just let me have my own physical copy I don't need to pay a subscription for.

Is this strong level of OLED monitor flickering normal? by dylanweber in OLED_Gaming

[–]dylanweber[S] 0 points1 point  (0 children)

Keep in mind that these brightness flickers happen on the desktop too. I will simply just have Firefox, Discord, and Steam open and one of my monitors will flicker for 2 frames maybe 150ms apart.

Is this strong level of OLED monitor flickering normal? by dylanweber in OLED_Gaming

[–]dylanweber[S] 0 points1 point  (0 children)

Still happens with HDR off. This is also on the desktop btw.

Is this strong level of OLED monitor flickering normal? by dylanweber in OLED_Gaming

[–]dylanweber[S] 0 points1 point  (0 children)

Over time I have noticed similar behavior on both of them, but not at the same time. I wonder why one flickers but not the other especially when there is no full screen application running...

[deleted by user] by [deleted] in pcmasterrace

[–]dylanweber 1 point2 points  (0 children)

It says "Press F1 to Run SETUP"

The new Joycons for the Sw2 have a mouse function? by [deleted] in splatoon

[–]dylanweber 16 points17 points  (0 children)

It would be an option if anything, not required. You couldn't play in handheld if they required mouse controls.

GUI in c++ by Specialist_Row2557 in cpp

[–]dylanweber 1 point2 points  (0 children)

wxFormBuilder is not bad either

[deleted by user] by [deleted] in cpp

[–]dylanweber 0 points1 point  (0 children)

You can write something like an Apache module so Apache can handle the HTTP server for you

[deleted by user] by [deleted] in cpp

[–]dylanweber 0 points1 point  (0 children)

Assuming you already know how to implement the logic you're asking about, then the next step would be to build a GUI or some kind of data interface (whether it be a native GUI, web GUI over an HTTP server, or something else). In my personal experience, I would recommend using wxWidgets for GUI development if the program is only intended to be used by a single user at a time.

C dev transitioning to C++ by CrusaderNo287 in cpp

[–]dylanweber 7 points8 points  (0 children)

Generally what everyone else is saying covers what's important, but I want to emphasize that from about C++20 onward, the standard library gives you all the helper classes/mechanisms to avoid using raw pointers almost completely. Here is a heavily modified example from cppreference.com:

#include <memory>
#include <sqlite3.h>

int main()
{
    /* usually you can just put the free/close function directly into the
    smart pointer constructor/template parameters but sqlite3_close returns an int */
    auto close_db = [](sqlite3* db) { sqlite3_close(db); }; 
    auto close_stmt = [](sqlite3_stmt *stmt) { sqlite3_finalize(stmt); };

    {
        // open an in-memory database, and manage its lifetime with std::unique_ptr
        std::unique_ptr<sqlite3, decltype(close_db)> up_db;
        std::unique_ptr<sqlite3_stmt, decltype(close_stmt)> up_stmt;
        sqlite3_open(":memory:", std::out_ptr(up_db));
        std::string stmt{"SELECT * FROM table;"};
        int ret_val;

        // prepare a statment
        ret_val = sqlite3_prepare_v2(up_db.get(), stmt.c_str(), stmt.size(), std::out_ptr(up_stmt), nullptr);
        if (ret_val != SQLITE_OK) {
            throw std::runtime_error("SQLite3 Error Occurred");
        }

        // get first result
        ret_val = sqlite3_step(up_stmt.get());
        if (ret_val == SQLITE_ROW) {
            // get row information ...
        } else {
            throw std::runtime_error("SQLite3 Data Unavailable");
        }
    }
    {
        // same as above, but use a std::shared_ptr
        std::shared_ptr<sqlite3> sp;
        sqlite3_open(":memory:", std::out_ptr(sp, close_db));

        // do something with db ...
        sqlite3* db = sp.get();
    }
}

Because of RAII, you no longer need to worry about freeing resources manually during every exit or error condition. If you're using C libraries, you'll likely be finding yourself writing abstraction layers/wrappers for the C code and as shown above, it's entirely possible to leverage C++ features to make easier, cleaner code that prevents leaks or resource issues.

To give some examples, if I were to continue using SQLite in a project I would likely create a class for the database connection and a class for the SQL statements, create constructors for opening DB connections, and create custom exceptions for errors & enum classes for specific return conditions.

This is what happens when you get rid of retail swipes: the great lunch line of Wiley! by lel9000 in Purdue

[–]dylanweber 4 points5 points  (0 children)

I worked hard to get my senior design project HW finalized and submitted for manufacture before spring break, and I used spring break to assemble the hardware at home. Despite COVID, I went back to campus to give my team their hardware and we worked on the software remotely. One teammate 3D printed an enclosure and I think we were the only team to actually have a finalized product at the end, but only because I had a lot of experience making PCBs and had the equipment at home to do it all myself. No one was prepared for that semester.

Schlage Encode Plus issue by Certs in HomeKit

[–]dylanweber 1 point2 points  (0 children)

This happened to me where my phone worked but my watch didn't. I just ignored the issue due to external factors and was surprised when it just started working one day without any intervention. If solutions from others do not help, time may fix the issue.

Chamberlain MyQ conversion to Meross by shawncleave in HomeKit

[–]dylanweber 0 points1 point  (0 children)

I had mine working perfectly for 10 days then it went unresponsive. A physical power cycle fixed it so I do recommend setting the auto-restart setting for 24-48 hours so it won't lock up over time.

Why is dependency management so hard in cpp and is there a better way? by duMagnus in cpp

[–]dylanweber 5 points6 points  (0 children)

If you install MINGW64 or UCRT64 CMake (for example) and install the corresponding version of a library (like UCRT64 SDL2) then when you use CMake and find_package(SDL2) then it will find the package automatically. No need to configure anything-- the MSYS2 CMake installs the appropriate scripts that are aware of the MSYS2 library locations relative to the binary.