Category:Cumulus MX: Difference between revisions

1,741 bytes removed ,  23:22, 22 March 2020
m
Line 167: Line 167:


=== Adding derivatives not shown on the existing interface page ===
=== Adding derivatives not shown on the existing interface page ===
It is a JavaScript file '''\CumulusMX\interface\js\dashboard.js''' that reads the standard web tags and inserts their content into position indicated by values of the HTML attribute "id" on the interface screens. The standard '''\CumulusMX\interface\now.html''' does not include temperature trend for example, but because there is a '''temptrend: inp.TempTrend.toString()''' defined in the JavaScript file, you can easily add it to the "now" page by a simple insert of the middle row here:
It is a JavaScript file '''\CumulusMX\interface\js\dashboard.js''' that reads the real-time file and inserts particular content into position indicated by values of the HTML attribute "id" on the interface screens. The standard '''\CumulusMX\interface\now.html''' does not include temperature trend for example, but because there is a '''temptrend: inp.TempTrend.toString()''' defined in the JavaScript file, you can easily add it to the "now" page by a simple insert of the middle row here:
<pre><tr>
<pre><tr>
           <td>Outdoor Temperature</td>
           <td>Outdoor Temperature</td>
Line 183: Line 183:
           <td><span class="TempUnit">--</span></td>
           <td><span class="TempUnit">--</span></td>
</tr></pre>
</tr></pre>
The Beaufort force wind description is not mentioned in the "dashboard.js", but there is a web tag <#beaudesc> for ''The current wind speed Beaufort description (e.g. "Gale")''. So we can edit
There is a section of the support forum devoted to [https://cumulus.hosiene.co.uk/viewforum.php?f=28 Cumulus MX interface customisation], so you can see what other people are doing.
'''dashboard.js''' to add this:
<pre>
      wlatest: inp.WindLatest.toString(),
      beaudesc: inp.Beaufort.toString(),
      wspeed: inp.WindAverage.toString(),</pre>
and then we can edit '''now.html''' to include it:
<pre>
</thead>
                        <tr>
                            <td>Latest</td>
                            <td><span id="WindLatest">--</span></td>
                            <td><span class="WindUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Bearing</td>
                            <td><span id="Bearing">--</span></td>
                            <td><span id="BearingCP">&deg;</span></td>
                        </tr>
   
                        <tr>
                            <td>Latest Beaufort</td>
                            <td><span id="Beaufort">--</span></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>Average Speed</td>
                            <td><span id="WindAverage">--</span></td>
                            <td><span class="WindUnit">--</span></td>
                        </tr>
                        <tr>
                            <td>Average Bearing</td>
                            <td><span id="Avgbearing">--</span></td>
                            <td><span id="AvgbearingCP">&deg;</span></td>
                        </tr>
                        <tr>
                            <td>Peak Gust</td>
                            <td><span id="Recentmaxgust">--</span></td>
                            <td><span class="WindUnit">--</span></td>
                        </tr>
                    </table></pre>


=== Changing Look ===
=== Changing Look ===
5,838

edits