Skip to content

Commit 30338f6

Browse files
restyled-commitshicklin
authored andcommitted
Restyled by clang-format
1 parent 17080d3 commit 30338f6

9 files changed

+455
-549
lines changed

examples/rvc-app/rvc-common/include/rvc-device.h

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include "rvc-service-area-delegate.h"
66
#include <app/clusters/mode-base-server/mode-base-server.h>
77
#include <app/clusters/operational-state-server/operational-state-server.h>
8-
#include <app/clusters/service-area-server/service-area-server.h>
98
#include <app/clusters/service-area-server/service-area-delegate.h>
9+
#include <app/clusters/service-area-server/service-area-server.h>
1010

1111
#include <string>
1212

@@ -43,8 +43,7 @@ class RvcDevice
4343
explicit RvcDevice(EndpointId aRvcClustersEndpoint) :
4444
mRunModeDelegate(), mRunModeInstance(&mRunModeDelegate, aRvcClustersEndpoint, RvcRunMode::Id, 0), mCleanModeDelegate(),
4545
mCleanModeInstance(&mCleanModeDelegate, aRvcClustersEndpoint, RvcCleanMode::Id, 0), mOperationalStateDelegate(),
46-
mOperationalStateInstance(&mOperationalStateDelegate, aRvcClustersEndpoint),
47-
mServiceAreaDelegate(),
46+
mOperationalStateInstance(&mOperationalStateDelegate, aRvcClustersEndpoint), mServiceAreaDelegate(),
4847
mServiceAreaInstance(&mServiceAreaDelegate, aRvcClustersEndpoint, BitMask<ServiceArea::Feature>(0))
4948
{
5049
// set the current-mode at start-up
@@ -102,8 +101,8 @@ class RvcDevice
102101
* @param locationText if setting the selected location failed, a description of the mode or condition prohibiting the change
103102
* size kMaxSizeStatusText + 1 for termination char
104103
* @return true if Selected Locations can be changed
105-
*/
106-
bool HandleIsSetSelectedLocationCallback(char* locationText);
104+
*/
105+
bool HandleIsSetSelectedLocationCallback(char * locationText);
107106

108107
/**
109108
* Updates the state machine when the device becomes fully-charged.
@@ -131,8 +130,6 @@ class RvcDevice
131130
void HandleClearErrorMessage();
132131

133132
void HandleResetMessage();
134-
135-
136133
};
137134

138135
} // namespace Clusters

examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h

+30-27
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/*
2-
*
3-
* Copyright (c) 2024 Project CHIP Authors
4-
* All rights reserved.
5-
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
17-
*/
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
* All rights reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
1818

1919
#pragma once
2020

@@ -35,22 +35,22 @@ class RvcServiceAreaDelegate : public Delegate
3535
{
3636
private:
3737
// containers for array attributes.
38-
std::vector<ServiceArea::LocationStructureWrapper> mSupportedLocations;
39-
std::vector<ServiceArea::MapStructureWrapper> mSupportedMaps;
40-
std::vector<uint32_t> mSelectedLocations;
41-
std::vector<ServiceArea::Structs::ProgressStruct::Type> mProgressList;
42-
38+
std::vector<ServiceArea::LocationStructureWrapper> mSupportedLocations;
39+
std::vector<ServiceArea::MapStructureWrapper> mSupportedMaps;
40+
std::vector<uint32_t> mSelectedLocations;
41+
std::vector<ServiceArea::Structs::ProgressStruct::Type> mProgressList;
4342

4443
public:
4544
CHIP_ERROR Init() override;
4645

4746
// command support
48-
bool IsSetSelectedLocationsAllowed(char* statusText) override;
47+
bool IsSetSelectedLocationsAllowed(char * statusText) override;
4948

5049
bool IsValidSelectLocationsSet(const ServiceArea::Commands::SelectLocations::DecodableType & req,
51-
ServiceArea::SelectLocationsStatus & locationStatus, char* statusText, bool & useStatusText) override;
50+
ServiceArea::SelectLocationsStatus & locationStatus, char * statusText,
51+
bool & useStatusText) override;
5252

53-
bool HandleSkipCurrentLocation(char* skipStatusText) override;
53+
bool HandleSkipCurrentLocation(char * skipStatusText) override;
5454

5555
//*************************************************************************
5656
// Supported Locations accessors
@@ -61,7 +61,8 @@ class RvcServiceAreaDelegate : public Delegate
6161

6262
bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::LocationStructureWrapper & supportedLocation) override;
6363

64-
bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, ServiceArea::LocationStructureWrapper & supportedLocation) override;
64+
bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex,
65+
ServiceArea::LocationStructureWrapper & supportedLocation) override;
6566

6667
bool AddSupportedLocation(const ServiceArea::LocationStructureWrapper & newLocation, uint32_t & listIndex) override;
6768

@@ -106,11 +107,13 @@ class RvcServiceAreaDelegate : public Delegate
106107

107108
bool GetProgressElementByIndex(uint32_t listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override;
108109

109-
bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override;
110+
bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex,
111+
ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override;
110112

111113
bool AddProgressElement(const ServiceArea::Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) override;
112114

113-
bool ModifyProgressElement(uint32_t listIndex, const ServiceArea::Structs::ProgressStruct::Type & modifiedProgressElement) override;
115+
bool ModifyProgressElement(uint32_t listIndex,
116+
const ServiceArea::Structs::ProgressStruct::Type & modifiedProgressElement) override;
114117

115118
bool ClearProgress() override;
116119
};

examples/rvc-app/rvc-common/src/rvc-device.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ void RvcDevice::Init()
1212
mOperationalStateInstance.Init();
1313
}
1414

15-
1615
void RvcDevice::SetDeviceToIdleState()
1716
{
1817
if (mCharging)
@@ -162,12 +161,11 @@ void RvcDevice::HandleOpStateGoHomeCallback(Clusters::OperationalState::GenericO
162161
}
163162
}
164163

165-
166-
bool RvcDevice::HandleIsSetSelectedLocationCallback(char* statusText)
164+
bool RvcDevice::HandleIsSetSelectedLocationCallback(char * statusText)
167165
{
168166
bool canSet;
169167

170-
switch(mRunModeInstance.GetCurrentMode())
168+
switch (mRunModeInstance.GetCurrentMode())
171169
{
172170
case RvcRunMode::ModeIdle:
173171
canSet = true;

0 commit comments

Comments
 (0)