MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / hasBatteryState

Method hasBatteryState

dependencies/hueplusplus-1.0.0/src/Sensor.cpp:75–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool Sensor::hasBatteryState() const
76{
77 return state.getValue().at("config").count("battery") != 0;
78}
79int Sensor::getBatteryState() const
80{
81 return state.getValue().at("config").at("battery").get<int>();

Callers 2

TYPED_TESTFunction · 0.45
TEST_FFunction · 0.45

Calls 2

getValueMethod · 0.80
countMethod · 0.45

Tested by 2

TYPED_TESTFunction · 0.36
TEST_FFunction · 0.36