Files
bobbycar-boardcomputer-firm…/main/bletexthelpers.h
2022-02-12 22:51:12 +01:00

28 lines
691 B
C++

#pragma once
// local includes
#include "textinterface.h"
#include "ble_bobby.h"
struct BleServerPeerDevicesText : public virtual espgui::TextInterface {
public:
std::string text() const override
{
std::string text = "peerDevices: ";
if (pServer)
text += std::to_string(pServer->getPeerDevices().size());
return text;
}
};
struct BleCharacSubscribedText : public virtual espgui::TextInterface {
public:
std::string text() const override
{
std::string text = "subscribed: ";
if (livestatsCharacteristic)
text += std::to_string(livestatsCharacteristic->getSubscribedCount());
return text;
}
};