Skip to content

Commit 60498ec

Browse files
STAC version 2.1 (#52)
* Dev branch for STAC v2.1 Dev branch for STAC v2.1 * Add bin files * Update NewFeatures.txt * set data type of ERROR_REPOLL_TIME Explicitly set ERROR_REPOLL_TIME #define as type UL Additional info to Detailed Change Log * Revise STAC.bin Revise the STAC bin file to match current version of the .ino * Update STACsuPages.h Add script to ensure proper IP delimiter entery * Update STAC .ino & .bin files Update Update .ino & .bin files to reflect change to STACsuPages.h * Update NewFeatures.txt Correct typos & grammar * Fix factory reset state Would sometimes miss the Factory Reset state when button down on reset.Fixed in STACProvision.h * Fix reset with button down modes Fix intermittent fail to select a Factory Reset on power up or reset with the button down. * GM release for final testing * Include GM bin file * Small code tweaks, all docs revised. Final code tweaks in the user "GUI" areas. All docs revised for v2.1 where required. * Tweaks to code and docs before release. Drawing library speed improvements. Corrections to docs.
1 parent afb78a8 commit 60498ec

38 files changed

+1971
-1491
lines changed

Documentation/Creating the build number.md

+25-21
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ String swVer = "2.0 (1a2b3c)"; // version and (build number) of this software
1212

1313
The string of six characters between the brackets is the build number. (`1a2b3c` is an example build number.)
1414

15-
It is generated by doing an MD5 hash of all the contents of the `STAC` folder and using the last six characters of that hash for the build number.
15+
It is generated by doing an MD5 hash of the `STAC.ino` file and the complete `STACLib` folder and using the last six characters of that hash for the build number.
1616

1717
The utility that creates the hash is `hashdir`. Found on GitHub at:
1818

@@ -22,7 +22,6 @@ and installed using Homebrew by:
2222

2323
`brew install ultimateanu/software/hashdir`
2424

25-
2625
To generate the build number, from Terminal run:
2726

2827
`hashdir -a md5 <folder>`
@@ -35,43 +34,48 @@ For example:
3534

3635
will produce something like:
3736

38-
`9c5d0c5114fab7a3f6b0770bd10bbefe /STAC`
37+
`f8f6d813acb9f0eeab371f1a80bd380e /STAC`
3938

40-
In this example, `0bbefe` would be the build number for this version of STAC.
39+
In this example, `bd380e` would be the build number for this version of STAC.
4140

4241
**BUT** before you generate the hash, first edit the line:
4342

44-
`String swVer = "2.0 (1a2b3c)"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS`
43+
` String swVer = "2.0 (1a2b3c)"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS`
4544

4645
to remove the old build number so that it looks like this:
4746

48-
`String swVer = "2.0 ()"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS`
47+
` String swVer = "2.0 ()"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS`
4948

50-
Then save the `STAC.ino` file and any other file that might be open from the `STACLib` foder.
49+
Then save and close the `STAC.ino` file and any other file that might be open from the `STACLib` folder.
5150

5251
Now create and save the new build number:
5352

54-
1. Generate the hash
55-
1. Copy the last six characters of the hash from the Terminal window - this is the new build number
56-
1. Open the `STAC.ino` file
57-
1. Paste the new build number in between the brackets on the line:
53+
1. Create a folder that contains only the `STAC.ino` file and the `STACLib` folder.
54+
1. Generate the hash of that folder.
55+
2. Copy the last six characters of the hash from the Terminal window - this is the new build number.
56+
3. Open the `STAC.ino` file.
57+
4. Paste the new build number in between the brackets on the line:
5858

59-
```
60-
String swVer = "2.0 ()"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS
61-
```
59+
```
60+
String swVer = "2.0 ()"; // version and (build number) of this software.
61+
Shows up on the web config page, serial monitor startup data dump & is
62+
stored in NVS
63+
```
6264

6365
so it now looks like:
6466

65-
```
66-
String swVer = "2.0 (0bbefe)"; // version and (build number) of this software. Shows up on the web config page, serial monitor startup data dump & is stored in NVS
67-
```
67+
```
68+
String swVer = "2.0 (1a2b3c)"; // version and (build number) of this software.
69+
Shows up on the web config page, serial monitor startup data dump & is
70+
stored in NVS
71+
```
6872
69-
5. Save the STAC.ino file
70-
6. Safe now to upload to the ATOM Matrix
73+
5. Save the STAC.ino file.
74+
6. Safe now to upload to the ATOM Matrix.
7175

7276
*Why delete the old build number before doing the hash?*
7377

74-
By making note of the existing build number in the `STAC.ino` file, deleting the build number and then generating the hash, a quick check can be made if this version of the `STAC.ino` file and its associated `STACLib` `.h` files are the same as a version running on an ATOM. Delete the existing build number from the `STAC.ino` file, generate the hash, look at and compare the last six digits of the hash to the build number reported by the serial data dump from the STAC. If they match, odds are strong you're good.
78+
By making note of the existing build number in the `STAC.ino` file, deleting the build number and then generating the hash, a quick check can be made if this version of the `STAC.ino` file and its associated `STACLib/*.h` files are the same as a version running on an ATOM. Delete the existing build number from the `STAC.ino` file, generate the hash, look at and compare the last six digits of the hash to the build number reported by the serial data dump from the STAC. If they match, odds are strong you're good.
7579

7680
**Xylopyrographer**<br>
77-
2022-08-05
81+
2023-02-13

Documentation/Detailed Change Log.md

+33-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,46 @@
33

44
Intended for developers and others interested in the nitty gritty.
55

6+
### Version 2.1
7+
8+
* Add the ability to do OTA firmware updates via a web browser.
9+
* routines are in `STACUtil.h`.
10+
* implemented using the `WebServer` library.
11+
* Use the `ESPmDNS` library when the STAC is operating a WiFi access point for setup & firmware updates.
12+
* operational details are in the *Users Guide.*
13+
* Move all HTML code for setup and OTA updates to `STACsuPages.h` and `STACotaPages.h` respectively.
14+
* make all HTML code HTML5 compliant.
15+
* Refactor the initialization code in `STACProvision.h`.
16+
* Refactor `getCreds()` in `STACUtil.h` to use the WebServer library.
17+
* Refactor the display drawing routines to increase speed by reducing the number of calls to `FastLED.show()`.
18+
* Add a function parameter to optionally refresh the display.
19+
* Revise all display calls throughout the code to match match the above.
20+
* Rename functions that draw to the display using `x` & `y` coordinates to `drawPixXY()` due to changing overloads for the `drawPix()` functions,
21+
* Set the display brightness using a LUT that maps a brightness level to an absolute value that is passed to `FastLED`.
22+
* the brightness LUT contains a max of 9 levels.
23+
* as it is a table, brightness can follow a curve.
24+
* Add the ability when in Peripheral Mode to change the Tally Display Mode to either Camera Operator or Talent.
25+
* operational details are in the *Users Guide.*
26+
* Rename `STACDisplay.h`, `STACGlyph.h` and `STACIMU.h` to `STACDisplay5.h`, `STACGlyph5.h` and `STACIMU5.h` respectively.
27+
* the "`5`" indicating use for 5 x 5 matrix displays.
28+
* except that the "`5`" for the `STACIMU5.h` file means it is for the IMU type used in the ATOM MATRIX.
29+
* Move `updateBrightness()` to `STACOpModes.h`
30+
* Modify layout of the serial data dumps.
31+
* Code changes throughout to make the code more modular and to convert a number of routines to be functions rather than in-line `#includes`.
32+
* Address a number of housekeeping items.
33+
634
### Version 2.0
735

836
* Require arduino-esp32 core 2.0.3 or greater
937
* there are irreconcilable breaking changes in WiFiClient from core 1.0.6
1038

1139
* Replace M5Stack ATOM libraries:
1240
* M5Stack are making library changes that are not backward compatible.
13-
* use JC_Button library for the display button;
14-
* use I2C_MPU6886 library for the IMU;
15-
* use FastLED library for the display;
16-
* replace "M5.dis.X" functions with bespoke display drawing routines.
17-
* directly initialize Serial.
41+
* use `JC_Button` library for the display button;
42+
* use `I2C_MPU6886` library for the IMU;
43+
* use `FastLED` library for the display;
44+
* replace "`M5.dis.X`" functions with bespoke display drawing routines.
45+
* directly initialize `Serial`.
1846

1947
* Break code into separate `.h` files by function group into a new STACLib folder.
2048
* add appropriate `#include` statements to `STAC.ino`.
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# Peripheral Mode Application Note
1+
## Peripheral Mode Application Note
22

33
As described in the *STAC User's Guide*, STAC software starting with version 1.10 adds a Peripheral Mode of operation.
44

5-
This note goes into what happens behind the scenes with the STAC running a version of software that implements Peripheral Mode: during startup; when operating as a peripheral; and also when in its normal operating state.
6-
<br><br>
5+
This note goes into what happens behind the scenes with the STAC running a version of software implementing Peripheral Mode: during startup; when operating as a peripheral; and also when in its normal operating state.
76

8-
### Initiating Client Mode
7+
### Initiating Peripheral Mode
98

109
A STAC is placed into Peripheral Mode by:
1110

1211
1. Placing a jumper wire between G22 and G33 on the ATOM rear header block.
13-
1. Applying power either via its USB port or a cable connecting its GROVE port to the GROVE port of another STAC. Do one or the other, not both.
12+
1. Applying power either via its USB port or a cable connecting its GROVE port to the GROVE port of another STAC. Do one or the other, never both.
1413

1514
When powered up or when reset, the STAC configures G22 as an output pin and G33 as an input pin (with weak pull down). It then toggles the state of G22 in a sequence and confirms that G33 follows. If G33 follows throughout the entire sequence, it is assumed the "Peripheral Mode jumper" is in place.
1615

@@ -19,32 +18,61 @@ If G33 fails to follow G22 at any point during the sequence, the STAC assumes th
1918
In either case G22 is then driven low.
2019

2120
After the STAC confirms the jumper is in place, it then configures G26 and G32 on its GROVE (HY2.0-4P) connector as input pins (with weak pull downs) and enters Peripheral Mode.
22-
<br><br>
2321

2422
### Operation in Peripheral Mode
2523

26-
In Peripheral Mode, all normal operation state and features of the STAC are disabled. The STAC will not connect to a WiFi network and it will ignore any Tally Channel, Operating Mode and Startup Mode settings. The Display Brightness select feature remains enabled as does the orientation feature so the Brightness Select numbers are displayed right side to.
24+
In Peripheral Mode, all normal operation state and features of the STAC are disabled. The STAC will not connect to a WiFi network and it will ignore any Tally Channel, Tally Display Mode and Startup Mode settings. The Display Brightness select feature remains enabled as does the orientation feature so the Brightness Select numbers are displayed right side to.
2725

2826
In Peripheral Mode, the STAC continually monitors the state of G26 and G32 on its GROVE port and uses the state of those inputs to determine the state of its tally display as per the table below.
2927

30-
| G26 | G32 | DISPLAYED<br>TALLY STATE |
31-
|:---:|:---:|:---:|
32-
| 0 | 0 | PVW |
33-
| 0 | 1 | PVW |
34-
| 1 | 0 | PVW |
35-
| 1 | 1 | PGM |
28+
<table>
29+
<tbody><center>
30+
<tr>
31+
<td rowspan="2"><b>G26</b></td>
32+
<td rowspan="2"><b>G32</b></td>
33+
<td colspan="2"><center><b>Displayed Tally State</center></td>
34+
</tr>
35+
<tr>
36+
<td><center><b>Talent</center></b></td>
37+
<td><center><b>Camera Operator</center></b></td>
38+
</tr>
39+
<tr>
40+
<td><center>0</center></td>
41+
<td><center>0</center></td>
42+
<td><center>PVW</center></td>
43+
<td><center>X</center></td>
44+
</tr>
45+
<tr>
46+
<td><center>0</center></td>
47+
<td><center>1</center></td>
48+
<td><center>PVW</center></td>
49+
<td><center>UNSELECTED</center></td>
50+
</tr>
51+
<tr>
52+
<td><center>1</center></td>
53+
<td><center>0</center></td>
54+
<td><center>PVW</center></td>
55+
<td><center>PVW</center></td>
56+
</tr>
57+
<tr>
58+
<td><center>1</center></td>
59+
<td><center>1</center></td>
60+
<td><center>PGM</center></td>
61+
<td><center>PGM</center></td>
62+
</tr>
63+
</center></tbody>
64+
</table>
3665

3766
**Where:**<br>
3867
&nbsp;&nbsp;&nbsp;**1** = logic high (true)<br>
3968
&nbsp;&nbsp;&nbsp;**0** = logic low (false)<br>
4069
&nbsp;&nbsp;&nbsp;**PVW** (Preview, Standby, Selected) = GREEN<br>
41-
&nbsp;&nbsp;&nbsp;**PGM** (Program, Live, On Air) = RED
70+
&nbsp;&nbsp;&nbsp;**PGM** (Program, Live, On Air) = RED<br>
71+
&nbsp;&nbsp;&nbsp;**UNSELECTED** = "PURPLE DOTTED"<br>
72+
&nbsp;&nbsp;&nbsp;**X** (Unknown) = Orange X<br>
4273

4374
Here's the cool part. This allows the opportunity for developers to use a STAC set in Peripheral Mode as a tally indicator driven by an external piece of gear. Simply connect a cable to the GROVE port, apply power and drive pins G26 and G32 as needed.
4475

45-
**Be aware that the ATOM Matrix GPIO pins use 3.3V logic levels and are not 5V tolerant.<br>Driving any GPIO pin beyond 3.3V will irreparably damage the device.**
46-
<br><br>
47-
4876
### Normal State (Controller) Output Signals
4977

5078
Starting with software v1.10, a STAC running it its normal operating state (not in Peripheral Mode) also acts as a controller by outputting the current tally state of the video channel it is monitoring to its GROVE connector. Pins G26 and G32 on this port are set as per the table below.
@@ -76,17 +104,11 @@ This could allow the STAC to:
76104

77105
The "UNSELECTED" state is useful as it indicates normal operation and communication of the controller STAC with the Roland (or emulated) device being monitored even if that channel is not active in either PGM or PVW.
78106

79-
<<<<<<< HEAD
80107
With proper cabling, multiple STACs operating in Peripheral Mode could be connected in parallel to a STAC operating in its normal state. No testing has been done to confirm how many STACs could be driven in this manner. Power supply would be an issue to consider as well.
81-
=======
82-
With proper cabling, multiple STACS operating in Peripheral Mode could be connected in parallel to a STAC operating in its normal state. No testing has been done to confirm how many STACs could be driven in this manner. Power supply would be an issue to consider as well.
83-
>>>>>>> main
84108

85109
**Note**: Apply power to the STAC either via its USB port or via a cable connected to its GROVE connector. Do one or the other only, *never* both.
86-
<br><br>
87-
88110

89-
### Disabling Client Mode
111+
### Disabling Peripheral Mode
90112

91113
To disable Peripheral Mode and return the STAC it to its normal operating state:
92114

@@ -95,20 +117,18 @@ To disable Peripheral Mode and return the STAC it to its normal operating state:
95117
1. Remove the Peripheral Mode jumper wire from the rear of the STAC.
96118
1. Power up the STAC via its USB port.
97119

98-
<br>
99-
100120
### Notes
101121

102-
1. **Be aware that the ATOM Matrix GPIO pins use 3.3V logic levels and are not 5V tolerant.<br>Driving any GPIO pin beyond 3.3V will irreparably damage the device.**
122+
1. **Be aware that the ATOM Matrix GPIO pins use 3.3V logic levels and are not 5V tolerant.**<br>Driving any GPIO pin beyond 3.3V will irreparably damage the device.
103123
1. Apply power to the STAC either via its USB port or through a cable connected to its GROVE connector. Do one or the other only, *never* both.
104-
1. The serial data dump on power up or restart when in Peripheral Mode (see the *Using screen for STAC Information.md* document) will report that the STAC is in Peripheral Mode and the brightness level set.
124+
1. The serial data dump on power up or restart when in Peripheral Mode (see the *Using screen for STAC Information.md* document) will report that the STAC is in Peripheral Mode and the brightness level and tally display mode set.
105125
1. The *Peripheral Mode* section of the *User's Guide* provides more information on the GROVE cable.
106-
<br><br>
107126

108127
---
109128

110129
### Document Revision History
111130

131+
**2023-02-04:** Added info reflecting changes with software v2.1. Fix heading titles.<br>
112132
**2022-08-06:** Cleaned up a few more things.<br>
113133
**2022-06-27:** Cleaned up a few things.<br>
114134
**2022-01-04:** First release.<br>

Documentation/Release Notes.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
11
# STAC Release Notes
2+
## v2.1
3+
4+
__New Features__
5+
6+
* _OTA Software Updates_
7+
8+
* After installing this version, it will be possible to update the STAC software over WiFi using a web browser. This is referred to as an *over the air* or OTA update. Details are in the the *STAC Users Guide*.
9+
* As a result of this change, the STAC will need to be setup again after installing this version.
10+
11+
* _mDNS Support_
12+
13+
* The mDNS protocol is now supported when the STAC opens up a WiFi hotspot for setup or a software update by pointing a browser to `setup.local` and `update.local` respectively. More information in the *STAC Users Guide*.
14+
15+
* _Camera Operator Tally Display in Peripheral Mode_
16+
17+
* The Tally Display Mode when the STAC is in Peripheral Mode can now be set to either Camera Operator or Talent. More info in, you guessed it, the *STAC Users Guide*.
18+
19+
20+
__Improvements__
21+
22+
* After doing a Factory Reset, the STAC will "park" and not reset itself which would then fire up a hotspot and wait for setup information.
23+
24+
* Revised the format of the information dump sent to the serial port on startup. The IP address assigned to the STAC is now shown as well.
25+
26+
* Added a bit more information about the STAC to the Setup browser page.
27+
28+
* Other internal kibbles and bits tweaked to speed things up—yada, yada...
29+
30+
231
## v2.0
332

433
__New Features__
@@ -28,9 +57,9 @@ __Improvements__
2857
* No longer requires modified core or M5Stack libraries.
2958
* But does require new libraries as per the `README.md` file.
3059

31-
* A new "*Detailed Change Log*" document intended for developers in the `Documentation` folder. It's the TLDR; version of this document.
60+
* A new *"Detailed Change Log"* document intended for developers in the `Documentation` folder. It's the TLDR; version of this document.
3261

33-
* A new "*Creating the build number*" document intended for developers in the `Documentation` folder.
62+
* A new *"Creating the build number"* document intended for developers in the `Documentation` folder.
3463

3564

3665
## v1.10

Documentation/STAC_README.md

-3
This file was deleted.

0 commit comments

Comments
 (0)