Combine ESP-NOW and MQTT in ESP32 Full builds
This commit is contained in:
1 parent
57dd2661b6
commit
6cb1c41eae
10 files changed
+336
-18
No files matched your search
@@ -695,6 +695,28 @@ for logging_target in Station_G2_repeater_observer_mqtt \
|
||||
verify_full_logging_contract "$logging_target" 1 off 1 yes yes
|
||||
verify_full_logging_contract "$logging_target" 0 "" 0 no no
|
||||
done
|
||||
|
||||
# Expanded ESP32 infrastructure Full images keep the MQTT observer recipe and
|
||||
# add the cooperative ESP-NOW bridge source. This is build-time composition,
|
||||
# not a second standalone image selected by the filename.
|
||||
ESP32_FULL_BUILD=1
|
||||
PLATFORMIO_BUILD_FLAGS=""
|
||||
PLATFORMIO_BUILD_SRC_FILTER=""
|
||||
BUILD_CAPABILITIES=()
|
||||
apply_esp32_full_shared_bridge_profile Station_G2_repeater_observer_mqtt
|
||||
[[ "$PLATFORMIO_BUILD_FLAGS" == *"-DWITH_ESPNOW_BRIDGE=1"* ]] \
|
||||
|| fail "Station G2 Full MQTT image did not enable ESP-NOW"
|
||||
[[ "$PLATFORMIO_BUILD_SRC_FILTER" == *"helpers/bridges/ESPNowBridge.cpp"* ]] \
|
||||
|| fail "Station G2 Full MQTT image did not include the ESP-NOW bridge"
|
||||
[[ " ${BUILD_CAPABILITIES[*]} " == *" bridge.espnow "* ]] \
|
||||
|| fail "Station G2 Full MQTT image did not report ESP-NOW capability"
|
||||
[[ "$(get_unified_full_infrastructure_target Station_G2_repeater_bridge_espnow)" \
|
||||
= "Station_G2_repeater_observer_mqtt" ]] \
|
||||
|| fail "Station G2 Full ESP-NOW target did not resolve to the combined MQTT recipe"
|
||||
ESP32_FULL_BUILD=0
|
||||
PLATFORMIO_BUILD_FLAGS=""
|
||||
PLATFORMIO_BUILD_SRC_FILTER=""
|
||||
|
||||
for logging_target in Station_G2_repeater_bridge_espnow heltec_v4_sensor; do
|
||||
verify_full_logging_contract "$logging_target" 1 "" 0 yes no
|
||||
verify_full_logging_contract "$logging_target" 1 on 1 yes no
|
||||
|
||||
@@ -1003,6 +1003,18 @@ for (const profile of capacityProfiles) {
|
||||
const currentObserver = currentCatalog.profiles.find(profile => profile.target === observer.target);
|
||||
assert.deepStrictEqual(picker.runtimeDirections(currentObserver, {logging: 'usb'})[0].actions[0].commands,
|
||||
['set logging.output usb', 'get logging.output']);
|
||||
const combinedControlData = JSON.parse(JSON.stringify(currentControls));
|
||||
combinedControlData.profiles[currentObserver.target].espnowBridge = true;
|
||||
const combinedCatalog = picker.buildCatalog([
|
||||
release(currentControls.familyTag, '2026-09-13T00:00:00Z', currentAssets),
|
||||
], combinedControlData);
|
||||
const combinedObserver = combinedCatalog.profiles.find(profile => profile.target === currentObserver.target);
|
||||
assert.deepStrictEqual(picker.profileFieldValues(combinedObserver, 'mode'), ['standard', 'espnow']);
|
||||
assert(picker.profileMatches(combinedObserver, {mode: 'espnow'}, ['mode']));
|
||||
const combinedDirections = picker.runtimeDirections(combinedObserver, {logging: 'usb'});
|
||||
assert(combinedDirections.some(section => section.title === 'MQTT + ESP-NOW bridge'));
|
||||
assert(!combinedDirections.some(section => section.title === 'ESP-NOW bridge'));
|
||||
assert.strictEqual(commands(combinedDirections).filter(command => command === 'set mqtt.enabled on').length, 1);
|
||||
console.log('current release metadata and capacity directions tests passed');
|
||||
|
||||
assert.strictEqual(nrf.chipFamily, 'nrf52');
|
||||
|
||||
Reference in new issue
Block a user