mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -1 +1 @@
|
||||
__version__ = '2.5.5'
|
||||
__version__ = '2.5.6'
|
||||
|
@ -9,7 +9,7 @@ from time import sleep
|
||||
|
||||
import pwnagotchi
|
||||
|
||||
requests.adapters.DEFAULT_RETRIES = 5 # increase retries number
|
||||
requests.adapters.DEFAULT_RETRIES = 5 # increase retries number
|
||||
|
||||
ping_timeout = 180
|
||||
ping_interval = 15
|
||||
|
@ -130,7 +130,7 @@ def install(display, update):
|
||||
|
||||
logging.info("[update] stopping %s ..." % update['service'])
|
||||
os.system("service %s stop" % update['service'])
|
||||
os.system("mv %s %s" % (source_path, dest_path))
|
||||
shutil.move(source_path, dest_path)
|
||||
os.chmod("/usr/local/bin/%s" % name, 0o755)
|
||||
logging.info("[update] restarting %s ..." % update['service'])
|
||||
os.system("service %s start" % update['service'])
|
||||
|
@ -56,7 +56,7 @@ def display_for(config):
|
||||
return Waveshare27inch(config)
|
||||
|
||||
elif config['ui']['display']['type'] == 'waveshare27inchv2':
|
||||
return Waveshare27inchv2(config)
|
||||
return Waveshare27inchV2(config)
|
||||
|
||||
elif config['ui']['display']['type'] == 'waveshare29inch':
|
||||
return Waveshare29inch(config)
|
||||
|
@ -32,11 +32,12 @@ import logging
|
||||
from . import epdconfig
|
||||
|
||||
# Display resolution
|
||||
EPD_WIDTH = 122
|
||||
EPD_HEIGHT = 250
|
||||
EPD_WIDTH = 122
|
||||
EPD_HEIGHT = 250
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class EPD:
|
||||
def __init__(self):
|
||||
self.reset_pin = epdconfig.RST_PIN
|
||||
|
@ -4,6 +4,7 @@ import pwnagotchi.ui.fonts as fonts
|
||||
from pwnagotchi.ui.hw.base import DisplayImpl
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class Waveshare213bV4(DisplayImpl):
|
||||
def __init__(self, config):
|
||||
super(Waveshare213bV4, self).__init__(config, 'waveshare213inb_v4')
|
||||
@ -68,4 +69,4 @@ class Waveshare213bV4(DisplayImpl):
|
||||
self._display.display(buffer(imageBlack), buffer(imageRed))
|
||||
|
||||
def clear(self):
|
||||
self._display.Clear()
|
||||
self._display.Clear()
|
||||
|
@ -2,7 +2,7 @@ import logging
|
||||
|
||||
import pwnagotchi.ui.fonts as fonts
|
||||
from pwnagotchi.ui.hw.base import DisplayImpl
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class WaveshareV4(DisplayImpl):
|
||||
def __init__(self, config):
|
||||
@ -31,8 +31,6 @@ class WaveshareV4(DisplayImpl):
|
||||
}
|
||||
return self._layout
|
||||
|
||||
|
||||
|
||||
def initialize(self):
|
||||
logging.info("initializing waveshare v4 display")
|
||||
from pwnagotchi.ui.hw.libs.waveshare.v4.epd2in13_V4 import EPD
|
||||
@ -40,11 +38,9 @@ class WaveshareV4(DisplayImpl):
|
||||
self._display.init()
|
||||
self._display.Clear(0xFF)
|
||||
|
||||
|
||||
def render(self, canvas):
|
||||
buf = self._display.getbuffer(canvas)
|
||||
self._display.displayPartial(buf)
|
||||
|
||||
|
||||
def clear(self):
|
||||
self._display.Clear(0xFF)
|
@ -89,8 +89,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="This program emulates\
|
||||
the pwnagotchi display")
|
||||
parser.add_argument('--displays', help="Which displays to use.", nargs="+", default=["waveshare_2"])
|
||||
parser.add_argument('--lang', help="Language to use",
|
||||
default="en")
|
||||
parser.add_argument('--lang', help="Language to use", default="en")
|
||||
parser.add_argument('--output', help="Path to output image (PNG)", default="preview.png")
|
||||
parser.add_argument('--show-peer', dest="showpeer", help="This options will show a dummy peer", action="store_true")
|
||||
parser.add_argument('--xmargin', help="Add X-Margin", type=int, default=5)
|
||||
|
Reference in New Issue
Block a user