From 72910284ff9b2857f7b874d1bdbae48abc33ae80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Sat, 31 Oct 2015 23:32:52 +0100 Subject: [PATCH] Minor changes to the configuration variables and imported modules. --- CHANGELOG.md | 1 + conf.py | 6 +++--- conf/conf.cfg-sample | 2 +- web/__init__.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75500f1..9a8a624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ EV3WebController project news 0.3 (2015-10-31) * detect if we are running on the EV3 as root; +* improved documentation for the installation. 0.2 (2015-10-29) * Beta release. It is possible to control the robot in four directions; diff --git a/conf.py b/conf.py index 481805c..5e3465b 100644 --- a/conf.py +++ b/conf.py @@ -20,10 +20,10 @@ import os, sys BASE_DIR = os.path.abspath(os.path.dirname(__file__)) PATH = os.path.abspath(".") -DEFAULTS = {"platform_url": "http://0.0.0.0:5000", +DEFAULTS = {"robot_external_address": "http://0.0.0.0:5000", "host": "0.0.0.0", "port": "5000", - "https": "true", + "https": "false", "debug": "true" } @@ -35,7 +35,7 @@ except: config = confparser.SafeConfigParser(defaults=DEFAULTS) config.read(os.path.join(BASE_DIR, "conf/conf.cfg")) -PLATFORM_URL = config.get('misc', 'platform_url') +ROBOT_EXTERNAL_ADDRESS = config.get('misc', 'robot_external_address') WEBSERVER_DEBUG = config.getboolean('webserver', 'debug') WEBSERVER_HOST = config.get('webserver', 'host') diff --git a/conf/conf.cfg-sample b/conf/conf.cfg-sample index bd0b96a..9aa7850 100644 --- a/conf/conf.cfg-sample +++ b/conf/conf.cfg-sample @@ -1,5 +1,5 @@ [misc] -platform_url = http://0.0.0.0:5000 +robot_external_address = http://0.0.0.0:5000 [webserver] debug = 1 host = 0.0.0.0 diff --git a/web/__init__.py b/web/__init__.py index 6e0f834..ba66c4f 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -13,8 +13,8 @@ import os from flask import Flask -from ev3.ev3dev import Key, Motor -from ev3.lego import LargeMotor +from ev3.ev3dev import Motor +#from ev3.lego import LargeMotor from ev3.lego import TouchSensor from ev3.lego import InfraredSensor -- GitLab