Skip to content

Commit b3502d8

Browse files
committed
Rename LCDPlugin members functions.
1 parent 20df89c commit b3502d8

File tree

6 files changed

+30
-29
lines changed

6 files changed

+30
-29
lines changed

src/bin/daemon/LCDPlugins/LCDPlugin.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const PBMDataArray & LCDPlugin::getNextPBMFrame(
137137
const std::string & LCDKey,
138138
const bool lockedPlugin)
139139
{
140-
this->drawPadlockOnFrame(lockedPlugin);
140+
this->drawPadlockOnPBMFrame(lockedPlugin);
141141
return this->getCurrentPBMFrame();
142142
}
143143

@@ -164,7 +164,7 @@ void LCDPlugin::addPBMFrame(
164164
fs::path filePath(PBMDirectory);
165165
filePath /= file;
166166

167-
this->addPBMClearedFrame(num);
167+
this->addPBMEmptyFrame(num);
168168

169169
try {
170170
this->readPBM(filePath.string(), _PBMFrames.back()._PBMData, PBM_WIDTH, PBM_HEIGHT);
@@ -175,7 +175,7 @@ void LCDPlugin::addPBMFrame(
175175
}
176176
}
177177

178-
void LCDPlugin::addPBMClearedFrame(
178+
void LCDPlugin::addPBMEmptyFrame(
179179
const uint16_t num)
180180
{
181181
try {
@@ -201,7 +201,7 @@ PBMDataArray & LCDPlugin::getCurrentPBMFrame(void)
201201
return (*_itCurrentPBMFrame)._PBMData;
202202
}
203203

204-
void LCDPlugin::writeStringOnFrame(
204+
void LCDPlugin::writeStringOnPBMFrame(
205205
FontsManager* const pFonts,
206206
const FontID fontID,
207207
const std::string & string,
@@ -234,7 +234,7 @@ void LCDPlugin::writeStringOnFrame(
234234
}
235235
}
236236

237-
void LCDPlugin::writeStringOnLastFrame(
237+
void LCDPlugin::writeStringOnLastPBMFrame(
238238
FontsManager* const pFonts,
239239
const FontID fontID,
240240
const std::string & string,
@@ -247,14 +247,14 @@ void LCDPlugin::writeStringOnLastFrame(
247247
_itCurrentPBMFrame = --(_PBMFrames.end());
248248
_PBMFrameIndex = (_itCurrentPBMFrame - _PBMFrames.begin());
249249

250-
this->writeStringOnFrame(pFonts, fontID, string, PBMXPos, PBMYPos);
250+
this->writeStringOnPBMFrame(pFonts, fontID, string, PBMXPos, PBMYPos);
251251
}
252252
catch (const GLogiKExcept & e) {
253253
GKSysLog(LOG_WARNING, WARNING, e.what());
254254
}
255255
}
256256

257-
void LCDPlugin::drawProgressBarOnFrame(
257+
void LCDPlugin::drawProgressBarOnPBMFrame(
258258
const uint16_t percent,
259259
const uint16_t PBMXPos,
260260
const uint16_t PBMYPos)
@@ -359,7 +359,7 @@ void LCDPlugin::drawProgressBarOnFrame(
359359
}
360360
}
361361

362-
void LCDPlugin::drawPadlockOnFrame(
362+
void LCDPlugin::drawPadlockOnPBMFrame(
363363
const bool lockedPlugin,
364364
const uint16_t PBMXPos,
365365
const uint16_t PBMYPos)
@@ -398,7 +398,7 @@ void LCDPlugin::drawPadlockOnFrame(
398398
}
399399
}
400400

401-
void LCDPlugin::resetEverLocked(void)
401+
void LCDPlugin::resetPluginEverLocked(void)
402402
{
403403
_everLocked = false;
404404
}

src/bin/daemon/LCDPlugins/LCDPlugin.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ class LCDPlugin
8383
const uint64_t getPluginID(void) const;
8484
const uint16_t getPluginTiming(void) const;
8585
const uint16_t getPluginMaxFrames(void) const;
86+
void resetPluginEverLocked(void);
87+
8688
void resetPBMFrameIndex(void);
8789
void prepareNextPBMFrame(void);
88-
void resetEverLocked(void);
8990

9091
virtual const PBMDataArray & getNextPBMFrame(
9192
FontsManager* const pFonts,
@@ -105,36 +106,36 @@ class LCDPlugin
105106
const uint16_t num = 1
106107
);
107108

108-
void addPBMClearedFrame(
109+
void addPBMEmptyFrame(
109110
const uint16_t num = 1
110111
);
111112

112113
const uint16_t getNextPBMFrameID(void) const;
113114
PBMDataArray & getCurrentPBMFrame(void);
114115

115-
void writeStringOnFrame(
116+
void writeStringOnPBMFrame(
116117
FontsManager* const pFonts,
117118
const FontID fontID,
118119
const std::string & string,
119120
const int16_t PBMXPos,
120121
const int16_t PBMYPos
121122
);
122123

123-
void writeStringOnLastFrame(
124+
void writeStringOnLastPBMFrame(
124125
FontsManager* const pFonts,
125126
const FontID fontID,
126127
const std::string & string,
127128
const int16_t PBMXPos,
128129
const int16_t PBMYPos
129130
);
130131

131-
void drawProgressBarOnFrame(
132+
void drawProgressBarOnPBMFrame(
132133
const uint16_t percent,
133134
const uint16_t PBMXPos,
134135
const uint16_t PBMYPos
135136
);
136137

137-
void drawPadlockOnFrame(
138+
void drawPadlockOnPBMFrame(
138139
const bool lockedPlugin,
139140
const uint16_t PBMXPos = 1,
140141
const uint16_t PBMYPos = 1

src/bin/daemon/LCDPlugins/endscreen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ void Endscreen::init(FontsManager* const pFonts, const std::string & product)
5555
fs::path PBMDirectory(PBM_DATA_DIR);
5656
PBMDirectory /= _plugin.getName();
5757

58-
this->addPBMClearedFrame(); /* frame #0 */
59-
this->writeStringOnLastFrame(pFonts, FontID::DEJAVUSANSBOLD1616, product, -1, -1);
58+
this->addPBMEmptyFrame(); /* frame #0 */
59+
this->writeStringOnLastPBMFrame(pFonts, FontID::DEJAVUSANSBOLD1616, product, -1, -1);
6060

61-
//this->addPBMFrame(PBMDirectory, "endscreen.pbm", 1); /* frame #0 */
61+
//this->addLCDFrame(PBMDirectory, "endscreen.pbm", 1); /* frame #0 */
6262

6363
LCDPlugin::init(pFonts, product);
6464
}

src/bin/daemon/LCDPlugins/splashscreen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ void Splashscreen::init(FontsManager* const pFonts, const std::string & product)
5555
fs::path PBMDirectory(PBM_DATA_DIR);
5656
PBMDirectory /= _plugin.getName();
5757

58-
this->addPBMClearedFrame(); /* frame #0 */
58+
this->addPBMEmptyFrame(); /* frame #0 */
5959
this->addPBMFrame(PBMDirectory, "splashscreen01.pbm", 1); /* #1 */
6060
this->addPBMFrame(PBMDirectory, "splashscreen01.pbm", 3); /* #2 #3 #4 */
6161

6262
std::string version(" version "); version += PACKAGE_VERSION;
63-
this->writeStringOnLastFrame(pFonts, FontID::MONOSPACE85, version, 48, 32);
63+
this->writeStringOnLastPBMFrame(pFonts, FontID::MONOSPACE85, version, 48, 32);
6464

6565
LCDPlugin::init(pFonts, product);
6666
}

src/bin/daemon/LCDPlugins/systemMonitor.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void SystemMonitor::init(FontsManager* const pFonts, const std::string & product
7575
hostname[HOST_NAME_MAX-1] = '\0';
7676
host.assign(hostname);
7777
}
78-
this->writeStringOnLastFrame(pFonts, FontID::MONOSPACE85, host, 16, 1);
78+
this->writeStringOnLastPBMFrame(pFonts, FontID::MONOSPACE85, host, 16, 1);
7979

8080
LCDPlugin::init(pFonts, product);
8181
}
@@ -86,7 +86,7 @@ const PBMDataArray & SystemMonitor::getNextPBMFrame(
8686
const bool lockedPlugin
8787
)
8888
{
89-
this->drawPadlockOnFrame(lockedPlugin);
89+
this->drawPadlockOnPBMFrame(lockedPlugin);
9090

9191
/* -- -- -- */
9292
std::string usedPhysicalMemory("");
@@ -168,7 +168,7 @@ const PBMDataArray & SystemMonitor::getNextPBMFrame(
168168
uint16_t usedMem = static_cast<uint16_t>(freeMem);
169169
usedMem = 100 - usedMem;
170170

171-
this->drawProgressBarOnFrame(usedMem, 24, 33);
171+
this->drawProgressBarOnPBMFrame(usedMem, 24, 33);
172172
usedPhysicalMemory = getPaddedPercentString(usedMem);
173173
}
174174

@@ -188,7 +188,7 @@ const PBMDataArray & SystemMonitor::getNextPBMFrame(
188188
std::fesetround(FE_TONEAREST);
189189
cpuPercentTotal = std::nearbyint(cpuPercentTotal);
190190

191-
this->drawProgressBarOnFrame(cpuPercentTotal, 24, 15);
191+
this->drawProgressBarOnPBMFrame(cpuPercentTotal, 24, 15);
192192
usedCPUActiveTotal = getPaddedPercentString(cpuPercentTotal);
193193

194194
_snapshot1 = s2;
@@ -248,9 +248,9 @@ const PBMDataArray & SystemMonitor::getNextPBMFrame(
248248

249249
/* percent - max 5 chars */
250250
/* net rate - max 12 chars */
251-
this->writeStringOnFrame(pFonts, FontID::MONOSPACE85, usedCPUActiveTotal, PERC_POS_X, 14);
252-
this->writeStringOnFrame(pFonts, FontID::MONOSPACE85, paddedRateString, NET_POS_X, 23);
253-
this->writeStringOnFrame(pFonts, FontID::MONOSPACE85, usedPhysicalMemory, PERC_POS_X, 32);
251+
this->writeStringOnPBMFrame(pFonts, FontID::MONOSPACE85, usedCPUActiveTotal, PERC_POS_X, 14);
252+
this->writeStringOnPBMFrame(pFonts, FontID::MONOSPACE85, paddedRateString, NET_POS_X, 23);
253+
this->writeStringOnPBMFrame(pFonts, FontID::MONOSPACE85, usedPhysicalMemory, PERC_POS_X, 32);
254254

255255
return LCDPlugin::getCurrentPBMFrame();
256256
}

src/bin/daemon/LCDScreenPluginsManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ LCDDataArray & LCDScreenPluginsManager::getNextLCDScreenBuffer(
197197
_itCurrentPlugin = _plugins.begin();
198198

199199
/* reset everLocked boolean */
200-
(*_itCurrentPlugin)->resetEverLocked();
200+
(*_itCurrentPlugin)->resetPluginEverLocked();
201201
}
202202

203203
/* check that current plugin is enabled */
@@ -211,7 +211,7 @@ LCDDataArray & LCDScreenPluginsManager::getNextLCDScreenBuffer(
211211
}
212212
}
213213

214-
/* reset frames to beginning */
214+
/* reset PBM frame to beginning */
215215
(*_itCurrentPlugin)->resetPBMFrameIndex();
216216
_frameCounter = 0;
217217
}

0 commit comments

Comments
 (0)