]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Thu, 11 Jun 2020 09:49:01 +0000 (11:49 +0200)
committerVincent <vincent@enhydra.fr>
Thu, 11 Jun 2020 09:49:01 +0000 (11:49 +0200)
.idea/workspace.xml
scripts/cron/cron.php
tools/pop/pop.py
tools/pop/scanner.py
tools/pop/startpopdaemon

index ce7c9bd6dc5e21d07a424ecdf5f7e5de5d97ae9d..edbce861c14089150300d08a9812a9189c027e4d 100644 (file)
@@ -4,9 +4,9 @@
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/tools/pop/pop.py" beforeDir="false" afterPath="$PROJECT_DIR$/tools/pop/pop.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/tools/pop/scanner.py" beforeDir="false" afterPath="$PROJECT_DIR$/tools/pop/scanner.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/tools/pop/startpopdaemon" beforeDir="false" afterPath="$PROJECT_DIR$/tools/pop/startpopdaemon" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1591437163856" duration="1334000" />
       <workItem from="1591438704520" duration="2066000" />
       <workItem from="1591456322960" duration="915000" />
-      <workItem from="1591458634078" duration="2877000" />
-    </task>
-    <task id="LOCAL-00275" summary=".">
-      <created>1578559851311</created>
-      <option name="number" value="00275" />
-      <option name="presentableId" value="LOCAL-00275" />
-      <option name="project" value="LOCAL" />
-      <updated>1578559851311</updated>
+      <workItem from="1591458634078" duration="3468000" />
+      <workItem from="1591856612414" duration="2361000" />
     </task>
     <task id="LOCAL-00276" summary=".">
       <created>1578855521161</created>
       <option name="project" value="LOCAL" />
       <updated>1591440466805</updated>
     </task>
-    <option name="localTasksCounter" value="324" />
+    <task id="LOCAL-00324" summary=".">
+      <created>1591461737974</created>
+      <option name="number" value="00324" />
+      <option name="presentableId" value="LOCAL-00324" />
+      <option name="project" value="LOCAL" />
+      <updated>1591461737974</updated>
+    </task>
+    <option name="localTasksCounter" value="325" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1585852940968" />
-    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1591440409900">
+    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1591461729560">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1591440409900" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1591461729560" />
     <state x="1060" y="275" key="FileChooserDialogImpl" timestamp="1590912263817">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index d916b4a40d9c8209cef93f30f30582a3d592ae4e..35aba3ba6d52ea803080ea929463323987c79861 100644 (file)
@@ -90,10 +90,10 @@ function _logSection($t)
 function cronRooms($cronmin)
 {
     _logSection('Rooms');
-    if ($cronmin % 5 == 0 && getState('bureauAutoMode') == '1') {
+    if (getState('bureauAutoMode') == '1') {
         updateBureauAuto();
     }
-    if ($cronmin % 5 == 0 && getState('chambreAutoMode') == '1') {
+    if (getState('chambreAutoMode') == '1') {
         updateChambreAuto();
     }
     checkPlanetarium();
index 24fc99edb8f6caa9a43c440b585d051d870c3e49..fa23d7768d78062c6fa3337bcbbb49836b67b2e5 100644 (file)
@@ -45,11 +45,11 @@ while True:
         ch = svc.getCharacteristics()[0]
 
         # Main loop --------
-        p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00')
+        p.writeCharacteristic(ch.valHandle + 1, b'\x02\x00')
 
         while True:
             try:
-                if p.waitForNotifications(0.2):
+                if p.waitForNotifications(1.0):
                     # handleNotification() was called
                     continue
 
@@ -59,6 +59,6 @@ while True:
                 print("Disconnected... Waiting for reconnection...")
                 break
 
-    except btle.BTLEDisconnectError:
-        print("Disconnect error")
+    except btle.BTLEDisconnectError as err:
+        print("Disconnect error {0}".format(err))
         continue
index a7802933cfadd174607abb31fa3bc19aa139179f..8c4322a48a155ccfd26c42f8f68e9c0290aead08 100644 (file)
@@ -1,6 +1,8 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from bluepy.btle import Scanner, DefaultDelegate
+from urllib import request
+import sys
 
 class ScanDelegate(DefaultDelegate):
     def __init__(self):
@@ -8,14 +10,14 @@ class ScanDelegate(DefaultDelegate):
 
     def handleDiscovery(self, dev, isNewDev, isNewData):
         if isNewDev:
-            print "Discovered device", dev.addr
+            print("Discovered device", dev.addr)
         elif isNewData:
-            print "Received new data from", dev.addr
+            print("Received new data from", dev.addr)
 
 scanner = Scanner().withDelegate(ScanDelegate())
-devices = scanner.scan(10)
+devices = scanner.scan(20)
 
 for dev in devices:
-    print "Device %s (%s), RSSI=%d dB" % (dev.addr, dev.addrType, dev.rssi)
+    print("Device %s (%s), RSSI=%d dB" % (dev.addr, dev.addrType, dev.rssi))
     for (adtype, desc, value) in dev.getScanData():
-        print "  %s = %s" % (desc, value)
+        print("  %s = %s" % (desc, value))
index b3fbae3eb9f836653bb4430d60dcf9e9c4fab69e..757af2be4fe26eda37255fc5e9179fdab78c8bb8 100644 (file)
@@ -1,2 +1,2 @@
 #!/bin/sh
-/sbin/start-stop-daemon --start --quiet --user root --chuid root --name pop-$1 --make-pidfile --pidfile /var/run/pop-$1.pid  --background --startas /bin/bash -- -c "exec /var/www/home/tools/pop/pop.py $1 >> /var/log/pop/$1.log 2>&1"
\ No newline at end of file
+/sbin/start-stop-daemon --start --quiet --user root --chuid root --name pop-$1 --make-pidfile --pidfile /var/run/pop-$1.pid --background --startas /bin/bash -- -c "exec /var/www/home/tools/pop/pop.py $1 >> /var/log/pop/$1.log 2>&1"
\ No newline at end of file