def takePicture(self, lat, longit, altitude):
self.proc2 = subprocess.Popen("omxplayer" + " -o hdmi videos/pictureTaken4.mp4", stdout=subprocess.PIPE, shell=True, preexec_fn=os.setsid)
try :
pictureTaken=self.api.actTakePicture()
#retrieve name of the picture taken
#actTakePicture return a json Array of array and the name of the picture is given under 'result' field
picturefilestring = pictureTaken['result'][0][0]
#removing the backslashes
picturefilestring = picturefilestring.replace('\\',"")
#get the picture name
picturename = re.search('DSC.*\.JPG', picturefilestring).group(0)
self.picturefilestringList.append(picturefilestring)
self.picturenameList.append(picturename)
self.latList.append(lat)
self.longList.append(longit)
self.altitudeList.append(altitude)
except Exception:
proc5 = subprocess.Popen("omxplayer" + " -o hdmi /mnt/Usb-Solo-Mapper/videos/errorTakingPicture.mp4", stdout=subprocess.PIPE, shell=True, preexec_fn=os.setsid)
proc5.wait()
self.logger.debug('errorTakingPicture!')
#
# Telecharge les photos prises pendant le vol, et ecrit dans les .exif les donnees GPS sauvegardees
#
评论列表
文章目录