From cdcec22e609688812bf0f5ac303cc9c6970efb23 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Thu, 16 Nov 2023 07:49:39 +0000 Subject: Version compiled FW with automatic macro (#267) * Version compiled FW with hash Auto generates a macro to type out version info, local and github compilation now includes commit hash and timestamp in final uf2 files * Fix local builds makefile doesn't like the script returning the macro, directed to null for local builds as version.dtsi file accessible --- config/adv360.keymap | 11 ++++++++++- config/version.dtsi | 0 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 config/version.dtsi (limited to 'config') diff --git a/config/adv360.keymap b/config/adv360.keymap index 8ece1db..cf80f15 100644 --- a/config/adv360.keymap +++ b/config/adv360.keymap @@ -7,6 +7,15 @@ / { behaviors { #include "macros.dtsi" + #include "version.dtsi" + #ifndef VERSION_MACRO + macro_ver: macro_ver { + compatible = "zmk,behavior-macro"; + label = "macro_version"; + #binding-cells = <0>; + bindings = <&kp RET>; + }; + #endif hm: homerow_mods { compatible = "zmk,behavior-hold-tap"; @@ -54,7 +63,7 @@ &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none &none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &bt BT_CLR &none &rgb_ug RGB_MEFS_CMD 5 &none &none &none &none &none &none - &none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none ¯o_ver &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none >; }; diff --git a/config/version.dtsi b/config/version.dtsi new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3