mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-24 13:58:00 -05:00
* [EGD-2825] clipboard class implementation * [EGD-2825] returnToPreviousView moved from appwindow to application class * [EGD-2825] paste * [EGD-2825] fixed paste label * [EGD-2825] copy * [EGD-2825] comment * [EGD-2825] removed init data * [EDG-2825] add clipboard UT * [EGD-2825] add sms fw option renamed SMSTemplateData to SMSTextData * [EGD-2825] fxies in EventStore * [EGD-2825] PR fixes * [EGD-2825] rem not needed comment
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#include "EventStore.hpp"
|
|
#include <log/log.hpp>
|
|
#include <memory>
|
|
#include <mutex.hpp>
|
|
|
|
namespace Store
|
|
{
|
|
// if it grows bigger than these few variables - consider moving it to ram with i.e.
|
|
// delayed construction singletone
|
|
Battery battery;
|
|
|
|
const Battery &Battery::get()
|
|
{
|
|
return battery;
|
|
}
|
|
|
|
Battery &Battery::modify()
|
|
{
|
|
return battery;
|
|
}
|
|
|
|
cpp_freertos::MutexStandard GSM::mutex;
|
|
|
|
GSM *GSM::get()
|
|
{
|
|
static auto ptr = new GSM();
|
|
return ptr;
|
|
}
|
|
|
|
void GSM::setSignalStrength(const SignalStrength &signalStrength)
|
|
{
|
|
cpp_freertos::LockGuard lock(mutex);
|
|
LOG_INFO("Setting signal strength to rssi = %d dBm (%d) : %d bars",
|
|
signalStrength.rssidBm,
|
|
signalStrength.rssi,
|
|
static_cast<int>(signalStrength.rssiBar));
|
|
|
|
this->signalStrength = signalStrength;
|
|
}
|
|
|
|
SignalStrength GSM::getSignalStrength()
|
|
{
|
|
cpp_freertos::LockGuard lock(mutex);
|
|
|
|
return signalStrength;
|
|
}
|
|
}; // namespace Store
|