update glcd

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0c2dcc9eb1
Author: redblue-pkt <redblue-pkt@orange.pl>
Date: 2020-06-19 (Fri, 19 Jun 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
redblue-pkt
2020-06-19 23:56:12 +02:00
committed by vanhofen
parent 29edb1b24a
commit 3aaa9c30d9
118 changed files with 6113 additions and 1533 deletions

View File

@@ -35,6 +35,7 @@
#include <cs_api.h>
#include <gui/plugins.h>//for relodplugins
#include <neutrino.h>
#include <driver/display.h>
#include <driver/screenshot.h>
#include <gui/rc_lock.h>
#include <rcsim.h>
@@ -202,6 +203,9 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
{"reloadchannels", &CControlAPI::ReloadChannelsCGI, ""},
#ifdef SCREENSHOT
{"screenshot", &CControlAPI::ScreenshotCGI, ""},
#endif
#ifdef ENABLE_GRAPHLCD
{"glcdscreenshot", &CControlAPI::GlcdScreenshotCGI, ""},
#endif
// boxcontrol - devices
{"volume", &CControlAPI::VolumeCGI, "text/plain"},
@@ -2177,6 +2181,23 @@ void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
}
}
#endif
#ifdef ENABLE_GRAPHLCD
void CControlAPI::GlcdScreenshotCGI(CyhookHandler *hh)
{
std::string filename = "/tmp/glcdscreenshot.png";
if(!hh->ParamList["name"].empty())
filename = hh->ParamList["name"];
cGLCD *cglcd = cGLCD::getInstance();
if (cglcd) {
if (cglcd->dumpBuffer((uint32_t*)cglcd->bitmap->Data(), cGLCD::PNG, filename.c_str()))
hh->SendOk();
else
hh->SendError();
}
}
#endif
//-----------------------------------------------------------------------------
void CControlAPI::ZaptoCGI(CyhookHandler *hh)