2.3
4/4/2023
The 5226 Hardware Test Webpage now displays additional information about the Encoder tests. You can now see the total number of Encoder tests that have been ran, and how many times each A, B, and Z signal have failed the tests for both forwards and backwards Encoder tests.
The names of the Encoder tests have been changed from "Encoder Test A to B" and "Encoder Test C to D" to "Encoder Test 1-2 (A-B)" and "Encoder Test 3-4 (C-D)".
New Buttons for each Encoder Test are displayed in the Function column of the webpage. These buttons display the current mode of the test and also can be used to toggle the mode through four options. The Mode defaults the the standard bi-directional test. It toggles to 1-->2, 3-->4 then 1<--2, 3<--4 then off and back to bi-directional. The purpose of the Off state is to be able to evalaute the number of tests and the number of failures without them changing.
The Encoder test was only testing the B-->A and D-->C directions.
There were actually two bugs. The A-->B and C-->D direction test was actually tesing the opposite direction. The second bug caused only a single direction to be tested.
The bug was caused by the wrong operator being used to toggle the test.
A bool true value is equivelent to 1. Anything non-zero is also considered true. The correct operator to use on a bool to toggle its state is the not "!" operator. The code was using the "~" invert operator. The "!" operator toggle the state between true and false, 1 and 0. The invert operator toggles the state of the bits in the variable. Using it on a variable equal to true (1) results in the value being equal to 0xFE. Using it again toggles the bit and the value goes back to 1. Both of these values evaluate to true when doing a boolean comparison.
Both of these issues have been resolved.
Each of the Analog Tests now have an Ramp/Stop button that can be used to toggle the analog ramp On and Off. The Ramp will stop or resume from wherever it is.
This feature will allow the user to stop the ramp and then use a meter rather than a scope to trace fixed voltages through the analog circuits.
The controller was resetting, which prevented the Web Page from being displayed. Using the debugger, it was determined that the Ram Test was failing. When it fails, it tries to use a printf to report details on a serial debug port. The printf was causing the controller generate a hard fault. This was found to be caused by insufficient stack space being allocated to the Ram Test task.
For intermittent failures the failed IO bits would disappear from the displayed hex value before they could make it to the Web Page. Any failed bit is now Or'd into a display only field and preserved until power cycle or a test reset.
The Common library will no longer declare the Board structure Public. That will now be done in any application that uses Common. This allows the Board Structure contents to be customized by each application with the use of conditional assembly (#define).
The BlackBox and Hardware_Test projects have been modified to work with this change.
By default, the Hardware_Test will now be compiled as a CAN Master with one Slave.