From 0546cdc1cf58a2801b2cb5b450496380927a83f7 Mon Sep 17 00:00:00 2001 From: krios-fabteam Date: Sat, 24 Nov 2018 11:49:14 +0100 Subject: [PATCH] disabled updates checks --- fabui/application/controllers/Settings.php | 10 +++++----- fabui/application/controllers/Updates.php | 6 +++++- fabui/application/helpers/fabtotum_helper.php | 4 ++-- fabui/application/helpers/os_helper.php | 5 +++++ fabui/application/helpers/update_helper.php | 2 ++ fabui/ext/py/fabtotum/fabui/macros/printing.py | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/fabui/application/controllers/Settings.php b/fabui/application/controllers/Settings.php index c5055222..a8210dbb 100644 --- a/fabui/application/controllers/Settings.php +++ b/fabui/application/controllers/Settings.php @@ -369,8 +369,8 @@ public function saveNetworkSettings($action = 'connect') storeNetworkSettings($net_type, $iface, $mode, $address, $netmask, $gateway); //update social feeds - downloadAllFeeds(); - downloadAllFilamentsFeeds(); + //downloadAllFeeds(); + //downloadAllFilamentsFeeds(); break; case "wlan": if($action == 'connect') @@ -408,8 +408,8 @@ public function saveNetworkSettings($action = 'connect') configureWireless($iface, $ssid, $password, $psk, $mode, $address, $netmask, $gateway, $ap_channel); storeNetworkSettings($net_type, $iface, $mode, $address, $netmask, $gateway, $ssid, $password, $psk); //update social feeds - downloadAllFeeds(); - downloadAllFilamentsFeeds(); + //downloadAllFeeds(); + //downloadAllFilamentsFeeds(); } else if($action == 'disconnect') { @@ -434,7 +434,7 @@ public function saveNetworkSettings($action = 'connect') $result = false; } writeNetworkInfo(); - reload_myfabtotum(); + //reload_myfabtotum(); //$this->output->set_content_type('application/json')->set_output(json_encode($result)); $this->output->set_content_type('application/json')->set_output(json_encode(getInterfaces())); } diff --git a/fabui/application/controllers/Updates.php b/fabui/application/controllers/Updates.php index d5fbd1ad..b291649b 100644 --- a/fabui/application/controllers/Updates.php +++ b/fabui/application/controllers/Updates.php @@ -58,6 +58,7 @@ public function index() function updateStatus() { //load helpers, config + /* $this->load->helper(array('update_helper', 'file', 'os_helper')); $this->config->load('fabtotum'); //get remote bundles status @@ -66,7 +67,10 @@ function updateStatus() write_file($this->config->item('updates_json_file'), json_encode($bundlesStatus)); }else{ $bundlesStatus['remote_connection'] = false; - } + }*/ + + $bundlesStatus['remote_connection'] = false; + $this->output->set_content_type('application/json')->set_output(json_encode($bundlesStatus)); } /** diff --git a/fabui/application/helpers/fabtotum_helper.php b/fabui/application/helpers/fabtotum_helper.php index f0f6739f..ef4c5a71 100644 --- a/fabui/application/helpers/fabtotum_helper.php +++ b/fabui/application/helpers/fabtotum_helper.php @@ -32,8 +32,8 @@ function createDefaultSettings() 'z_max_offset' => 241.5, 'settings_type' => 'default', 'hardware' => array( - 'head' => 'printing_head', - 'feeder' => 'built_in_feeder', + 'head' => 'printing_head_pro', + 'feeder' => 'printing_head_pro', 'camera' => array('version' => 'camera_v1', 'available' => false), 'bed' => array('enable'=> true) ), diff --git a/fabui/application/helpers/os_helper.php b/fabui/application/helpers/os_helper.php index d2db4b34..5e0cccb6 100644 --- a/fabui/application/helpers/os_helper.php +++ b/fabui/application/helpers/os_helper.php @@ -412,6 +412,11 @@ function downloadRemoteFile($remoteUrl, $path, $timeout=30, $do_internet_check=t */ function getRemoteFile($url, $do_internet_check=true, $headers = array(), $timeout=30, $ssl=false ) { + /** + * disable connections + **/ + return false; + if($do_internet_check) { if(!isInternetAvaialable()) diff --git a/fabui/application/helpers/update_helper.php b/fabui/application/helpers/update_helper.php index 60802f97..48bda224 100644 --- a/fabui/application/helpers/update_helper.php +++ b/fabui/application/helpers/update_helper.php @@ -144,6 +144,8 @@ function getUpdateStatus() $plugins['installed'] = getInstalledPlugins(); $plugins['need_update'] = false; + $isInternet = false; + if($isInternet){ //check only if internet is available $remoteMeta = getSystemRemoteVersions(); $remoteBundles = $remoteMeta['bundles']; diff --git a/fabui/ext/py/fabtotum/fabui/macros/printing.py b/fabui/ext/py/fabtotum/fabui/macros/printing.py index 728863e2..c52a8f57 100644 --- a/fabui/ext/py/fabtotum/fabui/macros/printing.py +++ b/fabui/ext/py/fabtotum/fabui/macros/printing.py @@ -214,7 +214,7 @@ def end_additive_safe_zone(app, args = None, lang='en_US.UTF-8'): setLanguage(lang) app.macro("M121", "ok", 2, _("Force endstops"), verbose=False ) app.macro("G90", "ok", 2, _("Setting abs position"), verbose=False) - app.macro("G0 X210 Y210 Z240 F10000", "ok", 100, _("Moving to safe zone"), verbose=False) + app.macro("G0 X150 Y170 Z240 F10000", "ok", 100, _("Moving to safe zone"), verbose=False) app.macro("G27 Z0", "ok", 100, _("Zeroing Z axis"), verbose=False) app.macro("M400", "ok", 200, _("Waiting for all moves to finish") ) app.macro("M18", "ok", 2, _("Motors off"), verbose=False )