MCPcopy Create free account
hub / github.com/andysworkshop/stm32plus / initialise

Method initialise

examples/pframe/PictureFrame.cpp:28–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 */
27
28bool PictureFrame::initialise() {
29
30 // initialise Nvic priority group configuration
31
32 Nvic::initialise();
33
34 // initialise the millisecond timer
35
36 MillisecondTimer::initialise();
37
38 // default to 20 seconds
39
40 _autoScrollMillis=20000;
41 _autoScrollEnabled=true;
42
43 // create and init the LCD manager
44
45 _lcdManager=new LcdManager;
46 if(!_lcdManager->initialise())
47 return false;
48
49 // create and init the FS manager
50
51 _fsManager=new FileSystemManager(*_lcdManager);
52 if(!_fsManager->initialise())
53 return false;
54
55 // create and init the touch manager
56
57 _touchManager=new TouchManager(*_lcdManager,*_fsManager);
58 if(!_touchManager->initialise())
59 return false;
60
61 // create and init the bitmap manager
62
63 _bitmapManager=new BitmapManager(*_lcdManager,*_fsManager);
64 if(!_bitmapManager->initialise())
65 return false;
66
67 // create the thumb manager
68
69 _thumbManager=new ThumbManager(_lcdManager->getLcd(),*_fsManager,*_touchManager,_bitmapManager->getImageCount());
70
71 // if the touch screen needs calibration, do it
72
73 if(_touchManager->needsCalibration() && !_touchManager->calibrate())
74 return false;
75
76 // clear the screen
77
78 _lcdManager->getLcd().clearScreen();
79
80 // create the image manager
81
82 _imageManager=new ImageManager(*_lcdManager,*_bitmapManager,_fsManager->getSdCard());
83 return _imageManager->initialise();
84}
85

Callers

nothing calls this directly

Calls 5

getImageCountMethod · 0.80
needsCalibrationMethod · 0.80
clearScreenMethod · 0.80
initialiseFunction · 0.50
calibrateMethod · 0.45

Tested by

no test coverage detected