Repository navigation
refactor(variants): cut E2a, GPS globals of 36 variants defined once - #59
Merged
Merged
Conversation
…once in VariantTarget.cpp (cut E2a)
…order and host test results
…e registry limit and read the init order of lilygo_techo_card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cut E2a of step 11, as planned in
docs/refactoring/0011-variant-target.md(section on cut E2 after upstream meshcore-dev#3753).The GPS driver, the location provider and the sensor manager of 36 variants (shapes A and A') are now defined once in
src/helpers/VariantTarget.cpp. Each of these variants drops the block from itstarget.cppand gets one line#define SENSORS_TARGET_GLOBALSin itstarget.h. The type ofsensorscomes fromtarget.hviadecltype(sensors).Diff: 36
target.cppand 36target.h,VariantTarget.cpp, plus 0011, README and the size table. 308 lines leave thetarget.cppfiles (249 GPS block, 35 includes no longer needed, 24 blank lines).Checks
ThinkNode_M5_companion_radio_serialfails to compile in both trees (D6/D7undeclared, set invariants/thinknode_m5/platformio.ini, which this PR does not touch).Station_G2_companion_radio_bleandStation_G3_ESP32_companion_radio_bleare 1.9 % over the flash partition in both trees alike.docs/refactoring/cut-e2a-sizes-20261110.tsv: flash delta from -944 to +168 bytes, RAM delta 0 or 8 bytes.Heltec_t114_repeateronly (nm -S, -800 bytes): no symbol is added or removed, the linker keeps another copy of some inline functions. The +156 to +168 bytes onheltec_v4_tft_*were not measured separately.Heltec_t114_repeater,Heltec_v3_repeaterand oneLilyGo_T-Echo_Cardenvironment. The GPS driver's pin calls keep their order among themselves. The display and button constructors now run before them; according to the disassembly they write no pin.Not verified
lilygo_techo_cardis part of the 36. Upstream T-Echo Card: switch GPS LNA with GPS power, enable L76K config meshcore-dev/MeshCore#3668 is open on that variant.