wifi-tally_Oostendam/documentation/build/patches.html

163 lines
16 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tally Patches &mdash; Oostendam Tallies documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/drawio.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Troubleshooting" href="troubleshooting.html" />
<link rel="prev" title="Server" href="server/index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Oostendam Tallies
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Build:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="overview.html">Tallies Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="hardware/index.html">Hardware Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="server/index.html">Server</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Tally Patches</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#led-patches">LED patches</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Migrating:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="migration.html">Migrating to a new PC</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Oostendam Tallies</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a></li>
<li class="breadcrumb-item active">Tally Patches</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/patches.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="tally-patches">
<h1>Tally Patches<a class="headerlink" href="#tally-patches" title="Permalink to this heading"></a></h1>
<p>This section describes the patches made to the software. These patches are provided in the repository so no user interaction is needed when building the firmware.</p>
<section id="led-patches">
<h2>LED patches<a class="headerlink" href="#led-patches" title="Permalink to this heading"></a></h2>
<p>The goal of the patches is to:</p>
<blockquote>
<div><ul class="simple">
<li><p>Disable any signal leds on error, like no wifi connected or server not accessble</p></li>
<li><p>Disable green led when on preview</p></li>
</ul>
</div></blockquote>
<p>In order to add these patches the following code was edited in the firmware:</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="n">_G</span><span class="p">.</span><span class="n">MyLed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">signal</span><span class="w"> </span><span class="n">that</span><span class="w"> </span><span class="n">nothing</span><span class="w"> </span><span class="n">is</span><span class="w"> </span><span class="n">being</span><span class="w"> </span><span class="n">done</span><span class="w"></span>
<span class="w"> </span><span class="n">initial</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLUE</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForWifiConnection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;Oo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">GREEN</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">invalidSettingsFile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;OoOoOooooooo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLUE</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForWifiIp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;OoOo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLUE</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForServerConnection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;OoOooo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLUE</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onPreview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">GREEN</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onAir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">RED</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onRelease</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;.&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">GREEN</span><span class="p">,</span><span class="w"> </span><span class="n">nil</span><span class="p">,</span><span class="w"> </span><span class="nb">false</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onUnknown</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;Oooooooo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLUE</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onHighlight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;OoOoOoOo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">WHITE</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">turnOff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>This code block was replaced with the following:</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="n">_G</span><span class="p">.</span><span class="n">MyLed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">initial</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForWifiConnection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">invalidSettingsFile</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForWifiIp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">waitForServerConnection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onPreview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onAir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">RED</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onRelease</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onUnknown</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">onHighlight</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;OoOoOoOo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">GREEN</span><span class="p">),</span><span class="w"></span>
<span class="w"> </span><span class="n">turnOff</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flashPattern</span><span class="p">(</span><span class="s">&quot;O&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">colors</span><span class="p">.</span><span class="n">BLACK</span><span class="p">),</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Upon each signal the leds will change, but into the BLACK color and into RED when the camera is active.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="server/index.html" class="btn btn-neutral float-left" title="Server" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="troubleshooting.html" class="btn btn-neutral float-right" title="Troubleshooting" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, Eljakim.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>