From cb526d15ba9c9d492839626cdea82985501c72db Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 5 Jan 2024 23:02:50 +0100 Subject: [PATCH] neutrino remove useless allow_flash from CmdParser() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6981a252c85d78b97b04a45fe5acfb49885b05c3 Author: vanhofen Date: 2024-01-05 (Fri, 05 Jan 2024) Origin message was: ------------------ - neutrino remove useless allow_flash from CmdParser() ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/update.cpp | 14 ++++---------- src/neutrino.cpp | 10 ++-------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index b447fdb88..70d8cbbbd 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -83,8 +83,6 @@ extern cVideo *videoDecoder; #include -extern int allow_flash; - //#define DRYRUN #define gTmpPath "/tmp/" @@ -302,7 +300,7 @@ bool CFlashUpdate::selectHttpImage(void) dprintf(DEBUG_NORMAL, "[update] url %s version %s (%d) timestamp %s (%ld) md5 %s name %s\n", url.c_str(), version.c_str(), newVer, versionInfo.getDate(), versionInfo.getDateTime(), md5.c_str(), name.c_str()); if (versionInfo.snapshot <= '2' && (newVer > curVer || versionInfo.getDateTime() > curInfo.getDateTime())) newfound = 1; - if (!allow_flash && (versionInfo.snapshot <= '2')) + if (versionInfo.snapshot <= '2') enabled = false; fileTypes[i] = versionInfo.snapshot; std::string description = versionInfo.getType(true); @@ -444,13 +442,11 @@ bool CFlashUpdate::checkVersion4Update() CFileBrowser UpdatesBrowser; CFileFilter UpdatesFilter; - if (allow_flash) - { - UpdatesFilter.addFilter(FILEBROWSER_UPDATE_FILTER); + UpdatesFilter.addFilter(FILEBROWSER_UPDATE_FILTER); #if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE - UpdatesFilter.addFilter("zip"); + UpdatesFilter.addFilter("zip"); #endif - } + std::string filters[] = {"bin", "txt"}; for (size_t i = 0; i < sizeof(filters) / sizeof(filters[0]) ; i++) UpdatesFilter.addFilter(filters[i]); @@ -496,8 +492,6 @@ bool CFlashUpdate::checkVersion4Update() fileType = 'Z'; else if (!strcmp(ptr, "zip")) fileType = 'Z'; - else if (!allow_flash) - return false; else fileType = 0; dprintf(DEBUG_NORMAL, "[update] manual file type: %s %c\n", ptr, fileType); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index e9ef27266..8ca6ad2fe 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -179,7 +179,6 @@ CInfoIcons *InfoIcons; #include "driver/lcd4l.h" #endif -int allow_flash = 1; Zapit_config zapitCfg; char zapit_lat[21]="#"; char zapit_long[21]="#"; @@ -2558,11 +2557,7 @@ void CNeutrinoApp::CmdParser(int argc, char **argv) sections_debug = 1; for(int x=1; x