update glcd

Conflicts:
	src/gui/movieplayer.h
	src/gui/weather_locations.h
	src/neutrino.cpp
This commit is contained in:
redblue-pkt
2020-06-19 23:56:12 +02:00
committed by Thilo Graf
parent 6435b167e5
commit 1b6f4fedf5
118 changed files with 6154 additions and 1538 deletions

View File

@@ -36,6 +36,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>
@@ -196,6 +197,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"},
@@ -2168,6 +2172,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)

View File

@@ -105,6 +105,7 @@ private:
void ReloadPluginsCGI(CyhookHandler *hh);
void ReloadChannelsCGI(CyhookHandler *hh);
void ScreenshotCGI(CyhookHandler *hh);
void GlcdScreenshotCGI(CyhookHandler *hh);
void ZaptoCGI(CyhookHandler *hh);
void StartPluginCGI(CyhookHandler *hh);
void LCDAction(CyhookHandler *hh);