MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / logSensorAvailability

Method logSensorAvailability

src/Hal/SensorDataProvider.cpp:389–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389void SensorDataProvider::logSensorAvailability()
390{
391 uint8_t index = 0U;
392 uint8_t cnt = m_impl->getNumSensors();
393
394 /* For user information, show the sensor driver states. */
395 while (cnt > index)
396 {
397 ISensor* sensor = m_impl->getSensor(index);
398
399 if (nullptr != sensor)
400 {
401 bool isAvailable = sensor->isAvailable();
402
403 LOG_INFO("Sensor %s: %s", sensor->getName(), (false == isAvailable) ? "-" : "available");
404 }
405
406 ++index;
407 }
408}
409
410void SensorDataProvider::channelOffsetToJson(JsonArray& jsonOffset, const ISensorChannel& channel) const
411{

Callers

nothing calls this directly

Calls 4

getNumSensorsMethod · 0.45
getSensorMethod · 0.45
isAvailableMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected