示例#1
0
 def update(self, dt):
     title = 'Pi Scan ' + version
     if debug:
         title += ' (debug)'
     self.titleLabel.text = title
     errorlog.closeLog()
     maxWait = 60
     count = stick.searchAndUnmount(self.syncWait > maxWait)
     if count == 0:
         self.syncWait = 0.0
         self.powerOff.text = 'All disks ejected. Ok to power off or disconnect disk.'
     else:
         timeLeft = maxWait - self.syncWait
         waitString = 'Force Ejecting now. '
         if timeLeft > 0:
             waitString = 'Syncing to disk. Waiting %0.0f more seconds before force ejecting.' % timeLeft
         self.syncWait += dt
         self.powerOff.text = waitString + ' [color=ff3333]Do not power off.[/color]'
     self.manager.mountPoint = None
     if ((odd.camera is not None and odd.camera.is_connected()) or
         (even.camera is not None
          and even.camera.is_connected())) and not gphoto:
         self.cameraOffButton.opacity = 1.0
     else:
         self.cameraOffButton.opacity = 0.0
示例#2
0
 def update(self, dt):
   self.titleLabel.text = 'Pi Scan ' + version
   errorlog.closeLog()
   maxWait = 60
   count = stick.searchAndUnmount(self.syncWait > maxWait)
   if count == 0:
     self.syncWait = 0.0
     self.powerOff.text = 'All disks ejected. Ok to power off or disconnect disk.'
   else:
     timeLeft = maxWait - self.syncWait
     waitString = 'Force Ejecting now. '
     if timeLeft > 0:
       waitString = 'Syncing to disk. Waiting %0.0f more seconds before force ejecting.' % timeLeft
     self.syncWait += dt
     self.powerOff.text = waitString + ' [color=ff3333]Do not power off.[/color]'
   self.manager.mountPoint = None
示例#3
0
文件: main.py 项目: intfrr/pi-scan
 def update(self, dt):
     self.titleLabel.text = 'Pi Scan ' + version
     errorlog.closeLog()
     maxWait = 60
     count = stick.searchAndUnmount(self.syncWait > maxWait)
     if count == 0:
         self.syncWait = 0.0
         self.powerOff.text = 'All disks ejected. Ok to power off or disconnect disk.'
     else:
         timeLeft = maxWait - self.syncWait
         waitString = 'Force Ejecting now. '
         if timeLeft > 0:
             waitString = 'Syncing to disk. Waiting %0.0f more seconds before force ejecting.' % timeLeft
         self.syncWait += dt
         self.powerOff.text = waitString + ' [color=ff3333]Do not power off.[/color]'
     self.manager.mountPoint = None
示例#4
0
 def update(self, dt):
   title = 'Pi Scan ' + version
   if debug:
     title += ' (debug)'
   self.titleLabel.text = title
   errorlog.closeLog()
   maxWait = 60
   count = stick.searchAndUnmount(self.syncWait > maxWait)
   if count == 0:
     self.syncWait = 0.0
     self.powerOff.text = 'All disks ejected. Ok to power off or disconnect disk.'
   else:
     timeLeft = maxWait - self.syncWait
     waitString = 'Force Ejecting now. '
     if timeLeft > 0:
       waitString = 'Syncing to disk. Waiting %0.0f more seconds before force ejecting.' % timeLeft
     self.syncWait += dt
     self.powerOff.text = waitString + ' [color=ff3333]Do not power off.[/color]'
   self.manager.mountPoint = None
   if ((odd.camera is not None and odd.camera.is_connected()) or
       (even.camera is not None and even.camera.is_connected())):
     self.cameraOffButton.opacity = 1.0
   else:
     self.cameraOffButton.opacity = 0.0