Get "empty document detection" working

This commit is contained in:
G.K.MacGregor
2020-12-06 17:57:05 +00:00
parent 1855d8dacb
commit f9ce912e79
6 changed files with 42 additions and 4 deletions

View File

@@ -81,6 +81,23 @@ void LevelOnePage::clearPage()
// If clearPage() is called outside constructor, we need to implement localEnhance.clear();
}
bool LevelOnePage::isEmpty() const
{
if (!localEnhance.isEmpty())
return false;
for (int i=0; i<32; i++)
if (m_CLUT[i] != defaultCLUT[i])
return false;
for (int r=0; r<25; r++)
for (int c=0; c<40; c++)
if (m_level1Page[r][c] != 0x20)
return false;
return true;
}
QByteArray LevelOnePage::packet(int packetNumber, int designationCode) const
{
QByteArray result(40, 0x00);