2019-09-04 15:28:38 +02:00
|
|
|
#include "DisplayProxyMAX7456.h"
|
|
|
|
|
|
|
|
DisplayProxyMAX7456::DisplayProxyMAX7456(Max7456 *osd)
|
|
|
|
{
|
|
|
|
this->osd = osd;
|
2021-10-28 11:50:57 +00:00
|
|
|
this->osd->init(6);
|
|
|
|
clear();
|
|
|
|
this->osd->setBlinkParams(_8fields, _BT_3BT);
|
|
|
|
|
|
|
|
externalVideo(false);
|
|
|
|
onScreenDisplay(true);
|
2019-09-04 15:28:38 +02:00
|
|
|
}
|
|
|
|
|
2021-10-28 14:44:20 +00:00
|
|
|
|
|
|
|
bool DisplayProxyMAX7456::on()
|
|
|
|
{
|
|
|
|
onScreenDisplay(true);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DisplayProxyMAX7456::off()
|
|
|
|
{
|
|
|
|
externalVideo(false);
|
|
|
|
onScreenDisplay(false);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-04 15:28:38 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2021-10-28 14:44:20 +00:00
|
|
|
|
2019-09-04 15:28:38 +02:00
|
|
|
bool DisplayProxyMAX7456::setOffset(int x, int y)
|
|
|
|
{
|
|
|
|
this->osd->setDisplayOffsets(x, y);
|
|
|
|
return true;
|
2021-10-28 11:50:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool DisplayProxyMAX7456::externalVideo(bool enabled)
|
|
|
|
{
|
|
|
|
this->osd->activateExternalVideo(enabled);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DisplayProxyMAX7456::onScreenDisplay(bool enabled)
|
|
|
|
{
|
|
|
|
this->osd->activateOSD(enabled);
|
|
|
|
return true;
|
2019-09-04 15:28:38 +02:00
|
|
|
}
|