Skip to content

Commit 263fc83

Browse files
committed
Merge branch 'master' of https://github.com/project-chip/connectedhomeip into bump_CI_images
2 parents 0237ed1 + e2ce403 commit 263fc83

File tree

4 files changed

+13
-32
lines changed

4 files changed

+13
-32
lines changed

examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(Endpoin
3434
const EmberAfAttributeMetadata * attributeMetadata,
3535
uint8_t * buffer, uint16_t maxReadLength)
3636
{
37-
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint);
3837
AttributeId attributeId = attributeMetadata->attributeId;
3938

40-
Device * dev = DeviceMgr().GetDevice(endpointIndex);
39+
Device * dev = DeviceMgr().GetDevice(endpoint);
4140
if (dev != nullptr && clusterId == app::Clusters::BridgedDeviceBasicInformation::Id)
4241
{
4342
using namespace app::Clusters::BridgedDeviceBasicInformation::Attributes;

examples/thermostat/linux/thermostat-manager.cpp

+5-11
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ ThermostatManager ThermostatManager::sThermostatMgr;
6161

6262
namespace {
6363

64-
CHIP_ERROR ChipErrorFromStatusCode(Status status)
65-
{
66-
StatusIB statusIB(status);
67-
return statusIB.ToChipError();
68-
}
69-
7064
template <typename DecodableAttributeType>
7165
static void OnAttributeChangeReported(const ConcreteDataAttributePath & path, const DecodableAttributeType & value);
7266

@@ -332,7 +326,7 @@ CHIP_ERROR ThermostatManager::SetSystemMode(SystemModeEnum systemMode)
332326
}
333327

334328
ChipLogError(AppServer, "Setting system mode: %u (%s)", systemModeValue, SystemModeString(systemMode));
335-
return ChipErrorFromStatusCode(SystemMode::Set(kThermostatEndpoint, systemMode));
329+
return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(SystemMode::Set(kThermostatEndpoint, systemMode));
336330
}
337331

338332
CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMode)
@@ -345,22 +339,22 @@ CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMo
345339
}
346340

347341
ChipLogError(AppServer, "Setting running mode: %u (%s)", runningModeValue, RunningModeString(runningMode));
348-
return ChipErrorFromStatusCode(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode));
342+
return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode));
349343
}
350344

351345
CHIP_ERROR ThermostatManager::SetCurrentTemperature(int16_t temperature)
352346
{
353-
return ChipErrorFromStatusCode(LocalTemperature::Set(kThermostatEndpoint, temperature));
347+
return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(LocalTemperature::Set(kThermostatEndpoint, temperature));
354348
}
355349

356350
CHIP_ERROR ThermostatManager::SetCurrentHeatingSetPoint(int16_t heatingSetpoint)
357351
{
358-
return ChipErrorFromStatusCode(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint));
352+
return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint));
359353
}
360354

361355
CHIP_ERROR ThermostatManager::SetCurrentCoolingSetPoint(int16_t coolingSetpoint)
362356
{
363-
return ChipErrorFromStatusCode(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint));
357+
return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint));
364358
}
365359

366360
void ThermostatManager::EvalThermostatState()

src/lib/support/BUILD.gn

+3-5
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,9 @@ static_library("support") {
301301
"${chip_root}/src/inet:inet_config_header",
302302
]
303303

304-
# Android has no 'platform' that provides logging
305-
if (current_os == "android") {
306-
public_deps += [ "${chip_root}/src/platform/android:logging" ]
307-
}
308-
304+
# Platforms that utilize CHIP_SYSTEM_CONFIG_PLATFORM_LOG need to
305+
# be pulled in here as public_deps since they hook into logging at
306+
# the macro level rather than just providing a LogV implementation.
309307
if (current_os == "mac" || current_os == "ios") {
310308
public_deps += [ "${chip_root}/src/platform/Darwin:logging" ]
311309
}

src/platform/logging/BUILD.gn

+4-14
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ source_set("default") {
7676
deps += [ ":stdio" ]
7777
} else if (chip_device_platform == "nuttx") {
7878
deps += [ "${chip_root}/src/platform/NuttX:logging" ]
79+
} else if (chip_device_platform == "android") {
80+
deps += [ "${chip_root}/src/platform/android:logging" ]
7981
} else {
80-
assert(
81-
chip_device_platform == "fake" || chip_device_platform == "android" ||
82-
chip_device_platform == "external" || chip_device_platform == "none")
82+
assert(chip_device_platform == "fake" ||
83+
chip_device_platform == "external" || chip_device_platform == "none")
8384
}
8485
}
8586
}
@@ -88,11 +89,6 @@ source_set("headers") {
8889
public = [ "LogV.h" ]
8990
}
9091

91-
# We need to reference the output file of ":stdio" at build time,
92-
# but get_target_outputs() does not work for binary targets. As a
93-
# workaround, define a reasonable path and make the target use it.
94-
stdio_archive = "$root_out_dir/liblogging-stdio.a"
95-
9692
source_set("stdio") {
9793
sources = [ "impl/stdio/Logging.cpp" ]
9894

@@ -104,10 +100,4 @@ source_set("stdio") {
104100
"${chip_root}/src/platform:platform_config_header",
105101
"${chip_root}/src/platform/logging:headers",
106102
]
107-
108-
# Ensure we end up with the expected output file name
109-
output_dir = get_path_info(stdio_archive, "dir")
110-
output_name = get_path_info(stdio_archive, "name")
111-
output_extension = get_path_info(stdio_archive, "extension")
112-
output_prefix_override = true
113103
}

0 commit comments

Comments
 (0)