Edited to make AI work

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-07-24 19:47:15 +02:00
parent 702d32292f
commit 27da741005
3 changed files with 5 additions and 6 deletions

View File

@ -13,7 +13,7 @@ fi
blink_led 10 & blink_led 10 &
if is_auto_mode; then if is_auto_mode; then
/usr/local/bin/pwnagotchi --debug /usr/local/bin/pwnagotchi
else else
/usr/local/bin/pwnagotchi --manual --debug /usr/local/bin/pwnagotchi --manual
fi fi

View File

@ -36,7 +36,7 @@ class Environment(gym.Env):
# see https://github.com/evilsocket/pwnagotchi/issues/583 # see https://github.com/evilsocket/pwnagotchi/issues/583
self._supported_channels = agent.supported_channels() self._supported_channels = agent.supported_channels()
self._extended_spectrum = any(ch > 140 for ch in self._supported_channels) self._extended_spectrum = any(ch > 150 for ch in self._supported_channels)
self._histogram_size, self._observation_shape = featurizer.describe(self._extended_spectrum) self._histogram_size, self._observation_shape = featurizer.describe(self._extended_spectrum)
Environment.params += [ Environment.params += [

View File

@ -6,7 +6,6 @@ import importlib, importlib.util
import logging import logging
default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "default") default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "default")
loaded = {} loaded = {}
database = {} database = {}
@ -44,7 +43,7 @@ def toggle_plugin(name, enable=True):
global loaded, database global loaded, database
if pwnagotchi.config: if pwnagotchi.config:
if not name in pwnagotchi.config['main']['plugins']: if name not in pwnagotchi.config['main']['plugins']:
pwnagotchi.config['main']['plugins'][name] = dict() pwnagotchi.config['main']['plugins'][name] = dict()
pwnagotchi.config['main']['plugins'][name]['enabled'] = enable pwnagotchi.config['main']['plugins'][name]['enabled'] = enable
save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml') save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml')