<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Developer Guide on EdS</title><link>https://cdeever.github.io/eds/docs/develop/</link><description>Recent content in Developer Guide on EdS</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://cdeever.github.io/eds/docs/develop/index.xml" rel="self" type="application/rss+xml"/><item><title>Firmware: lp-stand</title><link>https://cdeever.github.io/eds/docs/develop/lp-stand/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cdeever.github.io/eds/docs/develop/lp-stand/</guid><description>&lt;h1 id="firmware-lp-stand"&gt;Firmware: lp-stand&lt;a class="anchor" href="#firmware-lp-stand"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;ESP-IDF in C, following the conventions of &lt;code&gt;esp32-ma-bell-gateway&lt;/code&gt;: &lt;code&gt;main/app/&lt;/code&gt;,&#10;&lt;code&gt;main/config/&lt;/code&gt;, &lt;code&gt;main/hardware/&lt;/code&gt;, &lt;code&gt;main/network/&lt;/code&gt;, with a Makefile wrapper over&#10;&lt;code&gt;idf.py&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="the-split-that-matters"&gt;The split that matters&lt;a class="anchor" href="#the-split-that-matters"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Scene validation, effect rendering, gamma and event formatting are pure C with&#10;no ESP-IDF dependency, because that is where a bug is subtle: it shows up only&#10;as &lt;em&gt;the light looks wrong&lt;/em&gt;, or, for an event that is not valid JSON, as nothing&#10;at all. They are tested with a compiler and nothing else:&lt;/p&gt;</description></item><item><title>Firmware: cover-screen</title><link>https://cdeever.github.io/eds/docs/develop/cover-screen/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cdeever.github.io/eds/docs/develop/cover-screen/</guid><description>&lt;h1 id="firmware-cover-screen"&gt;Firmware: cover-screen&lt;a class="anchor" href="#firmware-cover-screen"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;The touch screen that shows the cover and has the five buttons&#10;(&lt;a href="https://cdeever.github.io/eds/docs/architecture/decisions/0020-a-touch-screen-that-can-change-what-plays/"&gt;ADR-0020&lt;/a&gt;).&#10;ESP-IDF in C, laid out as &lt;a href="../lp-stand/"&gt;lp-stand&lt;/a&gt; is, for an&#10;ESP32-2432S028R.&lt;/p&gt;&#10;&lt;h2 id="the-split-that-matters"&gt;The split that matters&lt;a class="anchor" href="#the-split-that-matters"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;What a touch means and what is painted over the cover are pure C, because&#10;that is where a bug shows up only as &lt;em&gt;it did the wrong thing when I touched&#10;it&lt;/em&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make test &lt;span style="color:#75715e"&gt;# needs gcc; no ESP-IDF, no hardware&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make pictures &lt;span style="color:#75715e"&gt;# draws each screen to a BMP, with a made-up cover&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;make pictures&lt;/code&gt; runs the board&amp;rsquo;s own drawing code. Change an icon, run it,&#10;and look.&lt;/p&gt;</description></item><item><title>Services: palette and lightd</title><link>https://cdeever.github.io/eds/docs/develop/services/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cdeever.github.io/eds/docs/develop/services/</guid><description>&lt;h1 id="services"&gt;Services&lt;a class="anchor" href="#services"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="palette"&gt;palette&lt;a class="anchor" href="#palette"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd services/palette&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make venv &lt;span style="color:#75715e"&gt;# .venv with editable install + dev extras&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make test &lt;span style="color:#75715e"&gt;# pytest, no network&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make serve PORT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;8731&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run a single test:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.venv/bin/pytest tests/test_extract.py::test_name -q&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="tuning-by-eye"&gt;Tuning by eye&lt;a class="anchor" href="#tuning-by-eye"&gt;&lt;/a&gt;&lt;/h3&gt;&#10;&lt;p&gt;The thresholds are judgment calls that no test can settle — where a color&#10;stops being a color, how much black field to discard. The CLI exists for that&#10;loop:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make palette COVERS&lt;span style="color:#f92672"&gt;=&lt;/span&gt;~/covers&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make sheet COVERS&lt;span style="color:#f92672"&gt;=&lt;/span&gt;~/covers &lt;span style="color:#75715e"&gt;# PNG contact sheet&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.venv/bin/eds-palette ~/covers --min-chroma 0.05 --min-lightness 0.08&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It prints truecolor swatches in the terminal and can render a sheet of&#10;thumbnails beside their weighted palettes, so many sleeves can be compared at&#10;once.&lt;/p&gt;</description></item><item><title>Tenant: deevnet-tenant-eds</title><link>https://cdeever.github.io/eds/docs/develop/tenant/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cdeever.github.io/eds/docs/develop/tenant/</guid><description>&lt;h1 id="tenant-deevnet-tenant-eds"&gt;Tenant: deevnet-tenant-eds&lt;a class="anchor" href="#tenant-deevnet-tenant-eds"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;The EdS tenant as code: its overlay network, its workload and its DNS records,&#10;rebuildable from scratch against Deevnet IoTaaS without a Deevnet IoTaaS commit&#10;(Deevnet ADR-0006).&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Index&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;1 (to be allocated in the factory&amp;rsquo;s &lt;code&gt;TENANTS.md&lt;/code&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Subnet&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;10.20.129.0/24&lt;/code&gt;, gateway &lt;code&gt;10.20.129.1&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Zone&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;eds.mobile.deevnet.net&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Service host&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;10.20.129.10&lt;/code&gt; — &lt;code&gt;palette&lt;/code&gt; and &lt;code&gt;lightd&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Module&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;tenant-module-v1.1.0&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="status-written-never-applied"&gt;Status: written, never applied&lt;a class="anchor" href="#status-written-never-applied"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;terraform validate&lt;/code&gt;d against the real module, with derived addressing checked&#10;against Deevnet ADR-0002. It has &lt;strong&gt;not&lt;/strong&gt; been planned or applied, and three things must&#10;happen first:&lt;/p&gt;</description></item><item><title>This Site</title><link>https://cdeever.github.io/eds/docs/develop/docs-site/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cdeever.github.io/eds/docs/develop/docs-site/</guid><description>&lt;h1 id="this-site"&gt;This Site&lt;a class="anchor" href="#this-site"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Hugo with the &lt;a href="https://github.com/alex-shpak/hugo-book"&gt;hugo-book&lt;/a&gt; theme,&#10;following the &lt;code&gt;deevnet-docs&lt;/code&gt; pattern. It lives at &lt;code&gt;docs/&lt;/code&gt; inside the monorepo&#10;so documentation and the thing it documents move in the same commit.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd docs&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make server &lt;span style="color:#75715e"&gt;# live reload on :1313&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make html &lt;span style="color:#75715e"&gt;# build to public/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The theme is a git submodule. After a fresh clone:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git submodule update --init --recursive&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="living-in-a-monorepo"&gt;Living in a monorepo&lt;a class="anchor" href="#living-in-a-monorepo"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Two consequences, both handled:&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;A repository serves exactly one Pages site.&lt;/strong&gt; The site is therefore published&#10;at &lt;code&gt;https://cdeever.github.io/eds/&lt;/code&gt; — the repository name, not the site name —&#10;and &lt;code&gt;baseURL&lt;/code&gt; reflects that. &lt;code&gt;BookEditPath&lt;/code&gt; carries the &lt;code&gt;docs/&lt;/code&gt; prefix so &amp;ldquo;edit&#10;this page&amp;rdquo; links resolve.&lt;/p&gt;</description></item></channel></rss>