Skip to content

Commit

Permalink
Fixing another selection with mouse problem
Browse files Browse the repository at this point in the history
  • Loading branch information
remibert committed Jul 16, 2022
1 parent a12decc commit 2f4847e
Show file tree
Hide file tree
Showing 13 changed files with 483 additions and 127 deletions.
24 changes: 18 additions & 6 deletions doc/lib/motion/historic.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ <h1 class="title">Module <code>lib.motion.historic</code></h1>
if item is not None:
if not filesystem.ismicropython():
# Remove the &#34;/&#34; before filename
item [0] = item[0][1:]
item [0] = item [0].lstrip(&#34;/&#34;)

# Add json file to the historic
Historic.historic.insert(0,item)

Expand All @@ -126,7 +127,10 @@ <h1 class="title">Module <code>lib.motion.historic</code></h1>
file = None
file = open(motion, &#34;rb&#34;)
motion_item = json.load(file)
if filesystem.exists(motion_item[0]):
filename = motion_item[0]
if not filesystem.ismicropython():
filename = filename.lstrip(&#34;/&#34;)
if filesystem.exists(filename):
Historic.add_item(motion_item)
except OSError as err:
logger.syslog(err)
Expand Down Expand Up @@ -428,7 +432,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
if item is not None:
if not filesystem.ismicropython():
# Remove the &#34;/&#34; before filename
item [0] = item[0][1:]
item [0] = item [0].lstrip(&#34;/&#34;)

# Add json file to the historic
Historic.historic.insert(0,item)

Expand All @@ -448,7 +453,10 @@ <h2 class="section-title" id="header-classes">Classes</h2>
file = None
file = open(motion, &#34;rb&#34;)
motion_item = json.load(file)
if filesystem.exists(motion_item[0]):
filename = motion_item[0]
if not filesystem.ismicropython():
filename = filename.lstrip(&#34;/&#34;)
if filesystem.exists(filename):
Historic.add_item(motion_item)
except OSError as err:
logger.syslog(err)
Expand Down Expand Up @@ -716,7 +724,8 @@ <h3>Static methods</h3>
if item is not None:
if not filesystem.ismicropython():
# Remove the &#34;/&#34; before filename
item [0] = item[0][1:]
item [0] = item [0].lstrip(&#34;/&#34;)

# Add json file to the historic
Historic.historic.insert(0,item)</code></pre>
</details>
Expand Down Expand Up @@ -777,7 +786,10 @@ <h3>Static methods</h3>
file = None
file = open(motion, &#34;rb&#34;)
motion_item = json.load(file)
if filesystem.exists(motion_item[0]):
filename = motion_item[0]
if not filesystem.ismicropython():
filename = filename.lstrip(&#34;/&#34;)
if filesystem.exists(filename):
Historic.add_item(motion_item)
except OSError as err:
logger.syslog(err)
Expand Down
12 changes: 6 additions & 6 deletions doc/lib/motion/motion.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>

def get_filename(self):
&#34;&#34;&#34; Get the storage filename &#34;&#34;&#34;
return &#34;%s Id=%d D=%2d&#34;%(self.filename, self.index, self.get_diff_count())
return &#34;%s Id=%d D=%d&#34;%(self.filename, self.index, self.get_diff_count())

def get_message(self):
&#34;&#34;&#34; Get the message of motion &#34;&#34;&#34;
return &#34;%s %s D=%2d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())
return &#34;%s %s D=%d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())

def get_informations(self):
&#34;&#34;&#34; Return the informations of motion &#34;&#34;&#34;
Expand Down Expand Up @@ -1365,11 +1365,11 @@ <h3>Methods</h3>

def get_filename(self):
&#34;&#34;&#34; Get the storage filename &#34;&#34;&#34;
return &#34;%s Id=%d D=%2d&#34;%(self.filename, self.index, self.get_diff_count())
return &#34;%s Id=%d D=%d&#34;%(self.filename, self.index, self.get_diff_count())

def get_message(self):
&#34;&#34;&#34; Get the message of motion &#34;&#34;&#34;
return &#34;%s %s D=%2d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())
return &#34;%s %s D=%d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())

def get_informations(self):
&#34;&#34;&#34; Return the informations of motion &#34;&#34;&#34;
Expand Down Expand Up @@ -1588,7 +1588,7 @@ <h3>Methods</h3>
</summary>
<pre><code class="python">def get_filename(self):
&#34;&#34;&#34; Get the storage filename &#34;&#34;&#34;
return &#34;%s Id=%d D=%2d&#34;%(self.filename, self.index, self.get_diff_count())</code></pre>
return &#34;%s Id=%d D=%d&#34;%(self.filename, self.index, self.get_diff_count())</code></pre>
</details>
</dd>
<dt id="lib.motion.motion.ImageMotion.get_informations"><code class="name flex">
Expand Down Expand Up @@ -1625,7 +1625,7 @@ <h3>Methods</h3>
</summary>
<pre><code class="python">def get_message(self):
&#34;&#34;&#34; Get the message of motion &#34;&#34;&#34;
return &#34;%s %s D=%2d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())</code></pre>
return &#34;%s %s D=%d&#34;%(strings.tostrings(lang.motion_detected), self.date[-8:], self.get_diff_count())</code></pre>
</details>
</dd>
<dt id="lib.motion.motion.ImageMotion.get_motion_detected"><code class="name flex">
Expand Down
Loading

0 comments on commit 2f4847e

Please sign in to comment.