Opening the frunk is 'ok' with the app .... but it doesn't survive the simplicity test..
Simplicity is relative, as with everything, but having to dig into pocket open phone, open app or click the notification bar and then click on 'open frunk' ... wow I'm exhausted just typing it.
wondering maybe nfc, maybe bluetooth...
maybe nfc tag near the front T, atleast a tap from the phone is less than a fumble
Test the mass storage gadget - … if it doesn’t work, likely a conflicting gadget is already loaded (try checking / removing loaders from boot/configtext)
For the normal load gadget line, they should be loaded together, only difference is that the music gadget can be loaded readonly as there is no need to allow the car to have write access to it.
<TBD> .... event date stamp min vs file ... concatenated 10min 'saved-front-...' files ... contruct 360-saved... with just the front and structure for merging sides and rear - assuming they will be able to be exported by Tesla soon :)
# Path to use for re-mounting to make sure get up to date data
umountdir = "/mnt/usb_share"
#The directory to sync
syncdir="/mnt/usb_share/TeslaCam"
#Filename prefix to test for
filenameprefix="saved-"
#Uploads files in a directory
def upload_files(path, level):
fullpath = os.path.join(syncdir,path)
print_output("Syncing " + fullpath,level)
if filenameprefix:
print_output("Syncing files with prefix only: " + filenameprefix, level)
....
#Loop through the files to check to upload
for f in files:
print_output("Found File: " + f,level)
if upload == 1 and (f[:len(filenameprefix)]==filenameprefix) and (overwrite == 1 ornot f in dfiles):
... and at the bottom ...
#re-mount the folder to make sure it's fresh
def remount():
cmd = [ 'sudo', 'umount', umountdir ]
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
cmd = [ 'sudo', 'mount', '-a' ]
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
#Start
remount()
crontab
*/5 * * * * python /home/pi/dbupteslacam.py
Issues/updates:
possibly need to control w/r more across the gadget and the share, there are some FSCK files appearing in the root and 0 byte file minutes. (pre-dropbox addition)
check dropbox handler to make sure noop if no wifi
update uploader to a daemon / stop it just spinning up multiple instances
update / use accelerometer on pi to trigger the copy / upload.. at least it will snapshot in case user forgets to hit the button even in wifi not available....
could maybe use trigger on phone to switch on phone hotspot... then tcp - teslacampi :) - could connect and use the phone hotspot to upload