Skip to content

Commit 4901e06

Browse files
committed
Use 'g' prefix for globals
1 parent 3e390b8 commit 4901e06

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/wifi-echo/server/esp32/main/EchoDeviceCallbacks.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void EchoDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, int
7272
}
7373
}
7474

75-
extern ClusterServer server;
75+
extern ClusterServer gServer;
7676
/* This function can be eliminated, and instead its contents will get executed */
7777
void EchoDeviceCallbacks::PostAttributeChangeCallback(uint8_t endpoint, ChipZclClusterId clusterId, ChipZclAttributeId attributeId,
7878
uint8_t mask, uint16_t manufacturerCode, uint8_t type, uint8_t size,
@@ -82,5 +82,5 @@ void EchoDeviceCallbacks::PostAttributeChangeCallback(uint8_t endpoint, ChipZclC
8282
Value cValue(kCHIPValueType_Bool);
8383
memcpy((void *) &cValue.Int64, (void *) value, size);
8484

85-
server.SetValue(endpoint, clusterId, attributeId, cValue);
85+
gServer.SetValue(endpoint, clusterId, attributeId, cValue);
8686
}

examples/wifi-echo/server/esp32/main/wifi-echo.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const char * TAG = "wifi-echo-demo";
108108
static EchoDeviceCallbacks EchoCallbacks;
109109
const uint8_t applicationVersion = 20;
110110
const uint8_t HWVersion = 1;
111-
ClusterServer server(applicationVersion, HWVersion);
111+
ClusterServer gServer(applicationVersion, HWVersion);
112112

113113
namespace {
114114

@@ -426,8 +426,8 @@ extern "C" void app_main()
426426
statusLED.Init(STATUS_LED_GPIO_NUM);
427427

428428
/* Add a cluster to the primary endpoint of our cluster server */
429-
server.AddCluster(&statusLED);
430-
PrintDataModel(server);
429+
gServer.AddCluster(&statusLED);
430+
PrintDataModel(gServer);
431431

432432
// Start the Echo Server
433433
InitDataModelHandler();

0 commit comments

Comments
 (0)