コード例 #1
0
ファイル: main.py プロジェクト: RobotsLibres/pi-scan-1
 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
ファイル: main.py プロジェクト: alexfowler/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
コード例 #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
ファイル: main.py プロジェクト: Tenrec-Builders/pi-scan
 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