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 &
if is_auto_mode; then
/usr/local/bin/pwnagotchi --debug
/usr/local/bin/pwnagotchi
else
/usr/local/bin/pwnagotchi --manual --debug
/usr/local/bin/pwnagotchi --manual
fi

View File

@ -36,7 +36,7 @@ class Environment(gym.Env):
# see https://github.com/evilsocket/pwnagotchi/issues/583
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)
Environment.params += [
@ -147,4 +147,4 @@ class Environment(gym.Env):
for name, value in self.last['state'].items():
if 'histogram' in name:
logging.info(" %s" % name.replace('_histogram', ''))
self._render_histogram(value)
self._render_histogram(value)

View File

@ -6,7 +6,6 @@ import importlib, importlib.util
import logging
default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "default")
loaded = {}
database = {}
@ -44,7 +43,7 @@ def toggle_plugin(name, enable=True):
global loaded, database
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]['enabled'] = enable
save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml')