Exclude a few SubGHz protocols to save flash space

This branch consolidates several [PRs](https://github.com/Next-Flip/Momentum-Firmware/issues?q=is:pr+is:open+author:956MB) (UI fixes and additions) into a usable build. Flash space is extremely low as is, and excluding some weather stations and other SubGHz protocols is necessary to be able to fit these PRs and allow for further changes. The ones that have been *temporarily* excluded are hopefully uncommon or legacy protocols that won't be missed if you're using this branch. The point of this branch being primarily UI features.

* #327
* #344
* #354
* #385

Excluded protocols:

* Uncommon/Regional gate, garage, and alarm protocols: `nero_sketch`, `nero_radio`, `ido`, `kia`, `power_smart`, `doitrand`, `ansonic`, `smc5326`, `linear_delta3`, `dooya`, `kinggates_stylo_4k`, `dickert_mahs`, `hay21`, `feron`, `elplast`, `schrader_gg4`, `tpms_generic`.
* Obscure weather-station protocols: `solight_te44`, `infactory`, `acurite_986`, `auriol_ahfl`, `auriol_hg0601a`, `emos_e601x`, `gt_wt_02`, `gt_wt_03`, `kedsum_th`, `nexus_th`, `oregon_v1`, `thermopro_tx4`, `tx_8300`, `vauno_en8822c`, `wendox_w6726`.
This commit is contained in:
956MB
2026-01-02 12:21:49 -06:00
parent 5f94d52516
commit 7e47619047
3 changed files with 194 additions and 132 deletions
+43 -1
View File
@@ -33,7 +33,49 @@ env.Append(
libenv = env.Clone(FW_LIB_NAME="subghz")
libenv.ApplyLibFlags()
sources = libenv.GlobRecursive("*.c*")
all_sources = libenv.GlobRecursive("*.c*")
excluded_protocols = [
#
# Weather Station
"protocols/ws_generic.c",
"protocols/vauno_en8822c.c",
"protocols/emos_e601x.c",
"protocols/wendox_w6726.c",
"protocols/solight_te44.c",
"protocols/auriol_ahfl.c",
"protocols/auriol_hg0601a.c",
"protocols/kedsum_th.c",
"protocols/gt_wt_02.c",
"protocols/gt_wt_03.c",
"protocols/thermopro_tx4.c",
"protocols/infactory.c",
"protocols/nexus_th.c",
"protocols/tx_8300.c",
#
# Uncommon/Regional
"protocols/feron.c",
"protocols/elplast.c",
"protocols/hay21.c",
"protocols/doitrand.c",
"protocols/nero_radio.c",
"protocols/nero_sketch.c",
"protocols/pcsg_generic.c",
"protocols/power_smart.c",
"protocols/kinggates_stylo_4k.c",
"protocols/dickert_mahs.c",
"protocols/ansonic.c",
"protocols/dooya.c",
"protocols/ido.c",
"protocols/kia.c",
"protocols/smc5326.c",
"protocols/linear_delta3.c",
"protocols/schrader_gg4.c",
"protocols/tpms_generic.c",
]
excluded_protocols_full = [f"lib/subghz/{f}" for f in excluded_protocols]
sources = [f for f in all_sources if str(f) not in excluded_protocols_full]
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
libenv.Install("${LIB_DIST_DIR}", lib)
+71 -62
View File
@@ -1,64 +1,90 @@
#include "protocol_items.h" // IWYU pragma: keep
const SubGhzProtocol* const subghz_protocol_registry_items[] = {
&subghz_protocol_gate_tx,
// Core
&subghz_protocol_raw,
&subghz_protocol_bin_raw,
&subghz_protocol_princeton,
// Garage/Gate
&subghz_protocol_keeloq,
&subghz_protocol_star_line,
&subghz_protocol_nice_flo,
&subghz_protocol_came,
&subghz_protocol_faac_slh,
&subghz_protocol_nice_flor_s,
&subghz_protocol_came_twee,
&subghz_protocol_came_atomo,
&subghz_protocol_nero_sketch,
&subghz_protocol_ido,
&subghz_protocol_kia,
&subghz_protocol_hormann,
&subghz_protocol_nero_radio,
&subghz_protocol_nice_flo,
&subghz_protocol_nice_flor_s,
&subghz_protocol_chamb_code,
&subghz_protocol_secplus_v1,
&subghz_protocol_secplus_v2,
&subghz_protocol_linear,
&subghz_protocol_marantec,
&subghz_protocol_marantec24,
&subghz_protocol_somfy_telis,
&subghz_protocol_somfy_keytis,
&subghz_protocol_scher_khan,
&subghz_protocol_princeton,
&subghz_protocol_raw,
&subghz_protocol_linear,
&subghz_protocol_secplus_v2,
&subghz_protocol_secplus_v1,
&subghz_protocol_megacode,
&subghz_protocol_holtek,
&subghz_protocol_chamb_code,
&subghz_protocol_power_smart,
&subghz_protocol_marantec,
&subghz_protocol_bett,
&subghz_protocol_doitrand,
&subghz_protocol_phoenix_v2,
&subghz_protocol_honeywell, // Should be before honeywell_wdb
&subghz_protocol_honeywell_wdb,
&subghz_protocol_magellan,
&subghz_protocol_intertechno_v3,
&subghz_protocol_clemsa,
&subghz_protocol_ansonic,
&subghz_protocol_smc5326,
&subghz_protocol_holtek_th12x,
&subghz_protocol_linear_delta3,
&subghz_protocol_dooya,
&subghz_protocol_hormann,
&subghz_protocol_hormann_bisecur,
&subghz_protocol_alutech_at_4n,
&subghz_protocol_kinggates_stylo_4k,
&subghz_protocol_faac_slh,
&subghz_protocol_phoenix_v2,
&subghz_protocol_star_line,
&subghz_protocol_gate_tx,
&subghz_protocol_bett,
&subghz_protocol_scher_khan,
&subghz_protocol_gangqi,
&subghz_protocol_roger,
&subghz_protocol_revers_rb2,
&subghz_protocol_holtek,
&subghz_protocol_holtek_th12x,
&subghz_protocol_clemsa,
&subghz_protocol_magellan,
// Established Regional
&subghz_protocol_x10,
&subghz_protocol_pocsag,
&subghz_protocol_intertechno_v3,
&subghz_protocol_legrand,
&subghz_protocol_honeywell,
&subghz_protocol_honeywell_wdb,
&subghz_protocol_mastercode,
&subghz_protocol_megacode,
&subghz_protocol_hollarm,
// &subghz_protocol_nero_sketch,
// &subghz_protocol_nero_radio,
// &subghz_protocol_ido,
// &subghz_protocol_kia,
// &subghz_protocol_power_smart,
// &subghz_protocol_doitrand,
// &subghz_protocol_ansonic,
// &subghz_protocol_smc5326,
// &subghz_protocol_linear_delta3,
// &subghz_protocol_dooya,
// &subghz_protocol_kinggates_stylo_4k,
// &subghz_protocol_dickert_mahs,
// &subghz_protocol_hay21,
// &subghz_protocol_feron,
// &subghz_protocol_elplast,
// Weather Station
&ws_protocol_oregon2,
&ws_protocol_oregon3,
&ws_protocol_lacrosse_tx,
&ws_protocol_acurite_5n1,
&ws_protocol_ambient_weather,
&ws_protocol_bresser_3ch,
&ws_protocol_acurite_592txr,
&ws_protocol_acurite_606tx,
&ws_protocol_acurite_609txc,
&ws_protocol_lacrosse_tx141thbv2,
// &ws_protocol_infactory,
// &ws_protocol_thermopro_tx4,
// &ws_protocol_nexus_th,
// &ws_protocol_gt_wt_02,
// &ws_protocol_gt_wt_03,
// &ws_protocol_acurite_606tx,
// &ws_protocol_acurite_609txc,
// &ws_protocol_acurite_986,
// &ws_protocol_bresser_3ch, // Should be before lacrosse
// &ws_protocol_lacrosse_tx,
// &ws_protocol_lacrosse_tx141thbv2,
// &ws_protocol_oregon2,
// &ws_protocol_oregon3,
// &ws_protocol_acurite_592txr,
// &ws_protocol_ambient_weather,
// &ws_protocol_solight_te44, // Should be before auriol
// &ws_protocol_solight_te44,
// &ws_protocol_auriol_th,
// &ws_protocol_oregon_v1,
// &ws_protocol_tx_8300,
@@ -66,24 +92,7 @@ const SubGhzProtocol* const subghz_protocol_registry_items[] = {
// &ws_protocol_auriol_ahfl,
// &ws_protocol_kedsum_th,
// &ws_protocol_emose601x,
// &ws_protocol_acurite_5n1,
// &ws_protocol_vauno_en8822c,
// &subghz_protocol_pocsag,
// &tpms_protocol_schrader_gg4,
&subghz_protocol_bin_raw,
&subghz_protocol_mastercode,
&subghz_protocol_x10,
&subghz_protocol_hormann_bisecur,
&subghz_protocol_legrand,
&subghz_protocol_dickert_mahs,
&subghz_protocol_gangqi,
&subghz_protocol_marantec24,
&subghz_protocol_hollarm,
&subghz_protocol_hay21,
&subghz_protocol_revers_rb2,
&subghz_protocol_feron,
&subghz_protocol_roger,
&subghz_protocol_elplast,
};
const SubGhzProtocolRegistry subghz_protocol_registry = {
+80 -69
View File
@@ -2,86 +2,97 @@
#include "../registry.h"
#include "../subghz_protocol_registry.h"
// Core
#include "raw.h"
#include "bin_raw.h"
#include "princeton.h"
// Garage/Gate
#include "keeloq.h"
#include "star_line.h"
#include "nice_flo.h"
#include "came.h"
#include "faac_slh.h"
#include "nice_flor_s.h"
#include "came_twee.h"
#include "came_atomo.h"
#include "nero_sketch.h"
#include "ido.h"
#include "kia.h"
#include "hormann.h"
#include "nero_radio.h"
#include "nice_flo.h"
#include "nice_flor_s.h"
#include "chamberlain_code.h"
#include "secplus_v1.h"
#include "secplus_v2.h"
#include "linear.h"
#include "marantec.h"
#include "marantec24.h"
#include "somfy_telis.h"
#include "somfy_keytis.h"
#include "scher_khan.h"
#include "gate_tx.h"
#include "raw.h"
#include "linear.h"
#include "linear_delta3.h"
#include "secplus_v2.h"
#include "secplus_v1.h"
#include "megacode.h"
#include "holtek.h"
#include "chamberlain_code.h"
#include "power_smart.h"
#include "marantec.h"
#include "bett.h"
#include "doitrand.h"
#include "hormann.h"
#include "hormann_bisecur.h"
#include "alutech_at_4n.h"
#include "faac_slh.h"
#include "phoenix_v2.h"
#include "star_line.h"
#include "gate_tx.h"
#include "bett.h"
#include "scher_khan.h"
#include "gangqi.h"
#include "roger.h"
#include "revers_rb2.h"
#include "holtek.h"
#include "holtek_ht12x.h"
#include "clemsa.h"
#include "magellan.h"
// Established Regional
#include "x10.h"
#include "pocsag.h"
#include "intertechno_v3.h"
#include "legrand.h"
#include "honeywell.h"
#include "honeywell_wdb.h"
#include "magellan.h"
#include "intertechno_v3.h"
#include "clemsa.h"
#include "ansonic.h"
#include "smc5326.h"
#include "holtek_ht12x.h"
#include "dooya.h"
#include "alutech_at_4n.h"
#include "kinggates_stylo_4k.h"
#include "infactory.h"
#include "thermopro_tx4.h"
#include "nexus_th.h"
#include "gt_wt_02.h"
#include "gt_wt_03.h"
#include "acurite_606tx.h"
#include "acurite_609txc.h"
#include "acurite_986.h"
#include "lacrosse_tx.h"
#include "lacrosse_tx141thbv2.h"
#include "mastercode.h"
#include "megacode.h"
#include "hollarm.h"
// #include "nero_sketch.h"
// #include "nero_radio.h"
// #include "ido.h"
// #include "kia.h"
// #include "power_smart.h"
// #include "doitrand.h"
// #include "ansonic.h"
// #include "smc5326.h"
// #include "linear_delta3.h"
// #include "dooya.h"
// #include "kinggates_stylo_4k.h"
// #include "dickert_mahs.h"
// #include "hay21.h"
// #include "feron.h"
// #include "elplast.h"
// #include "schrader_gg4.h"
// #include "tpms_generic.h"
// Weather Station
#include "oregon2.h"
#include "oregon3.h"
#include "acurite_592txr.h"
#include "ambient_weather.h"
#include "auriol_hg0601a.h"
#include "oregon_v1.h"
#include "tx_8300.h"
#include "wendox_w6726.h"
#include "auriol_ahfl.h"
#include "kedsum_th.h"
#include "emos_e601x.h"
#include "lacrosse_tx.h"
#include "acurite_5n1.h"
#include "solight_te44.h"
#include "ambient_weather.h"
#include "bresser_3ch.h"
#include "vauno_en8822c.h"
#include "pocsag.h"
#include "schrader_gg4.h"
#include "bin_raw.h"
#include "mastercode.h"
#include "x10.h"
#include "hormann_bisecur.h"
#include "legrand.h"
#include "dickert_mahs.h"
#include "gangqi.h"
#include "marantec24.h"
#include "hollarm.h"
#include "hay21.h"
#include "revers_rb2.h"
#include "feron.h"
#include "roger.h"
#include "elplast.h"
#include "acurite_592txr.h"
#include "acurite_606tx.h"
#include "acurite_609txc.h"
#include "lacrosse_tx141thbv2.h"
// #include "solight_te44.h"
// #include "infactory.h"
// #include "acurite_986.h"
// #include "auriol_ahfl.h"
// #include "auriol_hg0601a.h"
// #include "emos_e601x.h"
// #include "gt_wt_02.h"
// #include "gt_wt_03.h"
// #include "kedsum_th.h"
// #include "nexus_th.h"
// #include "oregon_v1.h"
// #include "thermopro_tx4.h"
// #include "tx_8300.h"
// #include "vauno_en8822c.h"
// #include "wendox_w6726.h"