move construction of Hardware sim components
to member init list
This commit is contained in:
parent
65162049b3
commit
23fedd8052
1 changed files with 5 additions and 7 deletions
|
@ -14,13 +14,11 @@ HardwareSimulator::HardwareSimulator(): HardwareAbstract(),
|
||||||
while(true){
|
while(true){
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||||
lv_tick_inc(2); /*Tell lvgl that 2 milliseconds were elapsed*/
|
lv_tick_inc(2); /*Tell lvgl that 2 milliseconds were elapsed*/
|
||||||
}})
|
}}),
|
||||||
{
|
mBattery(std::make_shared<BatterySimulator>()),
|
||||||
mBattery = std::make_shared<BatterySimulator>();
|
mDisplay(SDLDisplay::getInstance()),
|
||||||
mDisplay = SDLDisplay::getInstance();
|
mWifiHandler(std::make_shared<wifiHandlerSim>())
|
||||||
mWifiHandler = std::make_shared<wifiHandlerSim>();
|
{}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<BatteryInterface> HardwareSimulator::battery(){
|
std::shared_ptr<BatteryInterface> HardwareSimulator::battery(){
|
||||||
return mBattery;
|
return mBattery;
|
||||||
|
|
Loading…
Add table
Reference in a new issue