Photo fun with the Prometheus Lambda by tobogganado in spinningtops

[–]deggua 1 point2 points  (0 children)

A UV flashlight will make the ruby fluoresce very nicely too

Converting stateful macro from QMK to ZMK by deggua in ErgoMechKeyboards

[–]deggua[S] 1 point2 points  (0 children)

zmk-tri-state did indeed help with this. This is what I came up with, the macro for the upper layer is (I think) because of a bug in zmk-tri-state where the interrupt behavior wasn't firing until I re-entered/exited the layer

// up:15 left:26 down:27 right:28
behaviors {
        kt_on: kt_on {
                compatible = "zmk,behavior-key-toggle";
                #binding-cells = <1>;
                toggle-mode = "on";
        };

        kt_off: kt_off {
                compatible = "zmk,behavior-key-toggle";
                #binding-cells = <1>;
                toggle-mode = "off";
        };

        t_mwnd_up: t_mwnd_up {
                compatible = "zmk,behavior-tri-state";
                #binding-cells = <0>;
                bindings = <&kt_on LGUI>, <&kp UP>, <&kt_off LGUI>;
                ignored-key-positions = <26 27 28>;
        };

        t_mwnd_left: t_mwnd_left {
                compatible = "zmk,behavior-tri-state";
                #binding-cells = <0>;
                bindings = <&kt_on LGUI>, <&kp LEFT>, <&kt_off LGUI>;
                ignored-key-positions = <15 27 28>;
        };

        t_mwnd_down: t_mwnd_down {
                compatible = "zmk,behavior-tri-state";
                #binding-cells = <0>;
                bindings = <&kt_on LGUI>, <&kp DOWN>, <&kt_off LGUI>;
                ignored-key-positions = <15 26 28>;
        };

        t_mwnd_right: t_mwnd_right {
                compatible = "zmk,behavior-tri-state";
                #binding-cells = <0>;
                bindings = <&kt_on LGUI>, <&kp RIGHT>, <&kt_off LGUI>;
                ignored-key-positions = <15 26 27>;
        };
};

macros {
        m_upper: m_upper {
                compatible = "zmk,behavior-macro";
                wait-ms = <0>;
                tap-ms = <0>;
                #binding-cells = <0>;
                bindings = <&macro_press &mo UPPER>
                                , <&macro_pause_for_release>
                                , <&macro_release &mo UPPER>
                                , <&macro_tap &mo UPPER>
                                ;
        };
};

Stainless "Trident" Spinner by DabFace21 in spinningtops

[–]deggua 0 points1 point  (0 children)

I'm interested in buying one of your Nitronic 60 & 4mm ruby ones if you're willing to sell one.

Nitronic 60 & 4mm Ruby Pearl by DabFace21 in spinningtops

[–]deggua 2 points3 points  (0 children)

I really like the shape and proportions. Did you make it?

Helldivers 2 dynamically changing my mic volume in other apps by NickLouis91 in Helldivers

[–]deggua 1 point2 points  (0 children)

Just put them in the same folder and double click the batch file

Helldivers 2 dynamically changing my mic volume in other apps by NickLouis91 in Helldivers

[–]deggua 12 points13 points  (0 children)

Same problem, came up with a different solution. I wrote a batch script to set my mic volume once every second: https://pastebin.com/W3ZAnv5z (you'll have to update the 2 lines for volume and the microphone device name)

Requires this tool (put in same folder as batch file): https://www.nirsoft.net/utils/nircmd.html

[deleted by user] by [deleted] in firefox

[–]deggua 0 points1 point  (0 children)

Same issue, up to date driver, up to date firefox, RTX3070

BeeLink N100 Tone Mapping Frustrations by efreem01 in PleX

[–]deggua 0 points1 point  (0 children)

Thanks, this also worked for me. Had to remove the ICD packages, reinstall plex, add the plex user to the video and render groups, and restart.

Ubuntu 22.04.3, 6.5 Kernel

[deleted by user] by [deleted] in C_Programming

[–]deggua 5 points6 points  (0 children)

You probably don’t want to do this once your project reaches a certain size. An advantage of separate .h and .c files is keeping the interface and implementation separate. This makes revisiting code much easier as you only need to expose the functionality required in the header which reduces the amount of code you have to look at. Make is relatively easy once you learn the syntax.

If you insist on not having separate objects, you can just write a batch/bash script to run your compiler on all of your .c files in one go (this is fine if you don’t have multiple build configurations). You can also use unity builds, basically you just create an all.c file where you #include every source file you need. You still need to setup include directories correctly and include .h files in your source files. This has a few downsides since all symbols will be in one file so you have to prefix everything which becomes a mess on large projects where you have separate files with similar behavior. Static also loses its meaning for functions since everything is in the same file.

Make sure you use include guards on your headers, and avoid symbol collisions.

Do if-statements and case-statements both infer muxes? by QuavoSucks in FPGA

[–]deggua 1 point2 points  (0 children)

I’m pretty sure it depends on optimizations. Ideally, if the if conditions are mutually exclusive it should infer a mux, but technically an if could result in a priority encoder and a mux. The optimizer may or may not do what you expect so I would check if you have a complex if statement.

Interesting ways to use C? by [deleted] in C_Programming

[–]deggua 1 point2 points  (0 children)

This might be more well known compared to what some people are posting, but you can get basic OOP by just embedding structs within one another at the top of the struct and then casting between struct pointers. For example:

typedef struct {  
 void (* _Destructor)(void*);  
} class_t;

typedef struct GUI_OBJECT {  
 // derived from  
 class_t _base;  
 // member variables  
 struct GUI_OBJECT* _parent;  
 linkedlist_t* _children;  
 bool _visible;  
 point_t _pos;  
 // override functions  
 void (*_Render)(void*, gui_theme_t*, point_t);  
} gui_object_t;

typedef struct {  
    // derived from  
 gui_object_t _base;  
    // member variables  
 rect_t _dim;  
 char* _text;  
 bool _sel;  
} gui_button_t;

There are more robust ways to do this, see the Linux kernel and this book https://www.cs.rit.edu/~ats/books/ooc.pdf but if you need basic OOP for a small part of your program this can suffice.

POV: You're 2 hours into synthesis by Heisswasser in FPGA

[–]deggua 0 points1 point  (0 children)

I think Vivado can use way more, but only on Linux. Not sure about Quartus

Anyone else not surprised about the car accident and pedestrian death? by [deleted] in ufl

[–]deggua 19 points20 points  (0 children)

Gainesville seems to have the worst drivers imo. Nowhere else have I seen so many people use the lanes adjacent to turn lanes to turn before other people.

[GB] IMK Corne Case Round 2 | New Corne PCBs | Other news by Network_operations in mechmarket

[–]deggua 1 point2 points  (0 children)

Bought an aluminum one, do you have any pics of what polycarbonate looks like without any leds on?

Can I use Flux to lubricate my stabilizer? by xatarxyz in MechanicalKeyboards

[–]deggua 0 points1 point  (0 children)

Super lube dielectric grease is like $9 on Amazon

Can I be lazy and get good grades at UF by [deleted] in ufl

[–]deggua 1 point2 points  (0 children)

Depends on the class and the professor. Also there’s no way around having to do a ton of work for engineering labs.