mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-19 05:57:30 -04:00
Removed test code, small update in ServiceDB's destructor. Ready to merge
This commit is contained in:
@@ -84,7 +84,7 @@ sys::ReturnCodes ApplicationManager::InitHandler() {
|
||||
|
||||
//search for application with specified name and run it
|
||||
//TODO name of the app should be Homescreen but for tests is is "ApplicationClock"
|
||||
std::string runAppName = "ApplicationViewer";
|
||||
std::string runAppName = "ApplicationClock";
|
||||
|
||||
auto it = applications.find(runAppName);
|
||||
if( it!= applications.end()){
|
||||
|
||||
@@ -35,6 +35,10 @@ ServiceDB::ServiceDB()
|
||||
|
||||
ServiceDB::~ServiceDB() {
|
||||
|
||||
settingsDB.reset();
|
||||
contactsDB.reset();
|
||||
smsDB.reset();
|
||||
|
||||
Database::Deinitialize();
|
||||
LOG_INFO("[ServiceDB] Cleaning resources");
|
||||
}
|
||||
|
||||
@@ -124,30 +124,13 @@ public:
|
||||
// Invoked upon receiving data message
|
||||
sys::Message_t DataReceivedHandler(sys::DataMessage* msgl) override{
|
||||
|
||||
auto ret = DBServiceAPI::SettingsGet(this);
|
||||
|
||||
ret.language = SettingsLanguage ::GERMAN;
|
||||
ret.networkOperator = "MuditaConnectingPeople";
|
||||
|
||||
DBServiceAPI::SettingsUpdate(this,ret);
|
||||
|
||||
auto records = DBServiceAPI::SMSGetLimitOffset(this,0,4);
|
||||
|
||||
auto threads = DBServiceAPI::ThreadGetLimitOffset(this,0,4);
|
||||
|
||||
auto contacts = DBServiceAPI::ContactGetLimitOffset(this,0,4);
|
||||
|
||||
auto smsthread = DBServiceAPI::SMSGetLimitOffsetByThreadID(this,0,4,1);
|
||||
|
||||
LOG_ERROR("Available heap: %lu",usermemGetFreeHeapSize());
|
||||
|
||||
return std::make_shared<sys::ResponseMessage>( );
|
||||
}
|
||||
|
||||
// Invoked when timer ticked
|
||||
void TickHandler(uint32_t id) override{
|
||||
auto msg = std::make_shared<sys::DataMessage>(500);
|
||||
sys::Bus::SendUnicast(msg,"Blinky",this);
|
||||
//auto msg = std::make_shared<sys::DataMessage>(500);
|
||||
//sys::Bus::SendUnicast(msg,"Blinky",this);
|
||||
LOG_DEBUG("Blinky service tick!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user