generated from sirlilpanda/kicad-project-template-actionless
Added the zig_main project to software for zig based implementation of code for robot
This commit is contained in:
30
software/zig_main/include/matter_closure_patch.h
Normal file
30
software/zig_main/include/matter_closure_patch.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
// CHIP SDK closure-control cluster structs are missing operator==(const T&) required
|
||||
// by std::optional<T> comparison in GCC 14 C++23 mode.
|
||||
// This header adds free-function operators via ADL so the types satisfy
|
||||
// std::equality_comparable without touching managed_components sources.
|
||||
// Applied via -include CMake file property to the specific failing TUs only.
|
||||
#ifdef __cplusplus
|
||||
#include "app/clusters/closure-control-server/closure-control-cluster-objects.h"
|
||||
|
||||
namespace chip {
|
||||
namespace app {
|
||||
namespace Clusters {
|
||||
namespace ClosureControl {
|
||||
|
||||
inline bool operator==(const GenericOverallCurrentState & a, const GenericOverallCurrentState & b)
|
||||
{
|
||||
return a.position == b.position && a.latch == b.latch &&
|
||||
a.speed == b.speed && a.secureState == b.secureState;
|
||||
}
|
||||
|
||||
inline bool operator==(const GenericOverallTargetState & a, const GenericOverallTargetState & b)
|
||||
{
|
||||
return a.position == b.position && a.latch == b.latch && a.speed == b.speed;
|
||||
}
|
||||
|
||||
} // namespace ClosureControl
|
||||
} // namespace Clusters
|
||||
} // namespace app
|
||||
} // namespace chip
|
||||
#endif // __cplusplus
|
||||
Reference in New Issue
Block a user