1
0
MAX7456JSON/lib/DisplayProxy/DisplayProxyMAX7456.cpp
Jens True 79508f8912
Some checks failed
continuous-integration/drone/push Build is failing
File comments for all files
2021-11-10 09:35:27 +00:00

65 lines
1.2 KiB
C++

/**
* @file DisplayProxyMAX7456.cpp
* @author Jens True (jens.chr.true@gmail.com)
* @brief DisplayProxyMAX7456 Implementation
* @version 0.1
* @date 2021-11-10
*
* @copyright Copyright (c) 2021
*
*/
#include "DisplayProxyMAX7456.h"
DisplayProxyMAX7456::DisplayProxyMAX7456()
{
this->osd = new Max7456();
this->osd->init(6);
clear();
this->osd->setBlinkParams(_8fields, _BT_3BT);
externalVideo(false);
onScreenDisplay(true);
}
bool DisplayProxyMAX7456::on()
{
onScreenDisplay(true);
return true;
}
bool DisplayProxyMAX7456::off()
{
externalVideo(false);
onScreenDisplay(false);
return true;
}
bool DisplayProxyMAX7456::write(int x, int y, const char *text)
{
this->osd->print(text, x, y);
return true;
}
bool DisplayProxyMAX7456::clear()
{
this->osd->clearScreen();
return true;
}
bool DisplayProxyMAX7456::setOffset(int x, int y)
{
this->osd->setDisplayOffsets(x, y);
return true;
}
bool DisplayProxyMAX7456::externalVideo(bool enabled)
{
this->osd->activateExternalVideo(enabled);
return true;
}
bool DisplayProxyMAX7456::onScreenDisplay(bool enabled)
{
this->osd->activateOSD(enabled);
return true;
}