mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 20:44:44 -04:00
[EGD-7362] Merge release/0.76.1 into master
Merge release/0.76.1 into master.
This commit is contained in:
committed by
Piotr Tanski
parent
f5530a3ac4
commit
90e7a48198
@@ -170,6 +170,8 @@ namespace sys
|
||||
if (userInit) {
|
||||
userInit();
|
||||
}
|
||||
|
||||
powerManager->SetBootSuccess();
|
||||
}
|
||||
|
||||
void SystemManagerCommon::StartSystemServices()
|
||||
@@ -197,9 +199,9 @@ namespace sys
|
||||
|
||||
void SystemManagerCommon::StartSystem(InitFunction sysInit, InitFunction appSpaceInit)
|
||||
{
|
||||
powerManager = std::make_unique<PowerManager>();
|
||||
cpuStatistics = std::make_unique<CpuStatistics>();
|
||||
deviceManager = std::make_unique<DeviceManager>();
|
||||
powerManager = std::make_unique<PowerManager>();
|
||||
cpuStatistics = std::make_unique<CpuStatistics>();
|
||||
deviceManager = std::make_unique<DeviceManager>();
|
||||
|
||||
systemInit = std::move(sysInit);
|
||||
userInit = std::move(appSpaceInit);
|
||||
@@ -210,6 +212,12 @@ namespace sys
|
||||
cpuStatisticsTimer = sys::TimerFactory::createPeriodicTimer(
|
||||
this, "cpuStatistics", constants::timerInitInterval, [this](sys::Timer &) { CpuStatisticsTimerHandler(); });
|
||||
cpuStatisticsTimer.start();
|
||||
|
||||
powerManagerEfficiencyTimer = sys::TimerFactory::createPeriodicTimer(
|
||||
this, "logPowerManagerEfficiency", constants::powerManagerLogsTimerInterval, [this](sys::Timer &) {
|
||||
powerManager->LogPowerManagerEfficiency();
|
||||
});
|
||||
powerManagerEfficiencyTimer.start();
|
||||
}
|
||||
|
||||
bool SystemManagerCommon::Restore(Service *s)
|
||||
@@ -505,21 +513,6 @@ namespace sys
|
||||
return MessageNone{};
|
||||
});
|
||||
|
||||
connect(typeid(sys::CpuFrequencyMessage), [this](sys::Message *message) -> sys::MessagePointer {
|
||||
auto msg = static_cast<sys::CpuFrequencyMessage *>(message);
|
||||
|
||||
if (msg->getAction() == sys::CpuFrequencyMessage::Action::Increase) {
|
||||
powerManager->IncreaseCpuFrequency();
|
||||
cpuStatisticsTimer.start();
|
||||
}
|
||||
else if (msg->getAction() == sys::CpuFrequencyMessage::Action::Decrease) {
|
||||
powerManager->DecreaseCpuFrequency();
|
||||
cpuStatisticsTimer.start();
|
||||
}
|
||||
|
||||
return sys::MessageNone{};
|
||||
});
|
||||
|
||||
connect(typeid(sys::DeviceRegistrationMessage), [this](sys::Message *message) -> sys::MessagePointer {
|
||||
auto msg = static_cast<sys::DeviceRegistrationMessage *>(message);
|
||||
deviceManager->RegisterNewDevice(msg->getDevice());
|
||||
|
||||
Reference in New Issue
Block a user