From d9924bec7d534bdc1a3a385a7de6446d3b8f8cb2 Mon Sep 17 00:00:00 2001
From: Cassiano Aquino <cassianoaquino@me.com>
Date: Wed, 25 Sep 2019 15:46:19 +0100
Subject: [PATCH] move png image to shm to avoid SD card writes

---
 sdcard/rootfs/root/pwnagotchi/scripts/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdcard/rootfs/root/pwnagotchi/scripts/main.py b/sdcard/rootfs/root/pwnagotchi/scripts/main.py
index 4aeb781..6f44622 100755
--- a/sdcard/rootfs/root/pwnagotchi/scripts/main.py
+++ b/sdcard/rootfs/root/pwnagotchi/scripts/main.py
@@ -62,7 +62,7 @@ if args.do_manual:
 
             core.log("detected a new session and internet connectivity!")
 
-            picture = '/tmp/pwnagotchi.png'
+            picture = '/dev/shm/pwnagotchi.png'
 
             display.update()
             display.image().save(picture, 'png')
@@ -121,9 +121,9 @@ while True:
         # An interesting effect of this:
         #
         # From Pwnagotchi's perspective, the more new access points
-        # and / or client stations nearby, the longer one epoch of 
+        # and / or client stations nearby, the longer one epoch of
         # its relative time will take ... basically, in Pwnagotchi's universe,
-        # WiFi electromagnetic fields affect time like gravitational fields 
+        # WiFi electromagnetic fields affect time like gravitational fields
         # affect ours ... neat ^_^
         agent.next_epoch()
     except Exception as e: