- The inversion-related setting have changed, so use the new setters for this. - For one test case, the number of detected errors dropped a bit. Note that that this isn't just that the new code analyzes the data better, since at some points it sees errors where the old code didn't. However, the capture contains a lot of noise in some places, which means it's not entirely clear what "correct" should be. Manual comparison of the testcase shows that the new code doesn't do obviously incorrect things, so just updating the test case to the new values makes sense.
- This option allows changing the idle level from the default HIGH level to low, affecting the expected value of the start and stop bits. The interpretation of the data and parity bits is unchanged (and can be influenced with the existing bit encoding toggle).
- Previously, the most commonly seen length between edges was used as the length of one bit. Now, the (weighted) average of all lengths near the the most commonly seen length is used, which helps a lot when the sampling rate isn't very high (since there is no longer a rounding error from rounding to an integer number of samples).
- The previous commit made the decoder resync whenever it saw an edge in the area where it would expect one. This helps decoding a signal where the baudrate / bit length is not entirely correct, but from these corrections we can again calculate the real baudrate / bit length. - This is done by keeping a running total of the number and length of bits we find between two confirmed edges, from which we can calculate an average at the end, from which the baudrate is calculated again.
- This helps to decode signals when there is a small error in the baudrate, provided that there are sufficient edges inside the byte.
- In addition, the "current time" variable is also made a double. Combined, these prevent effectively rounding to the nearest full sample time after every bit, which can cause decoding errors when 8 of those rounding errors are stacked. - This commit significantly improves decoding for low samplerates (tested with a samplerate of 50Khz and a baudrate of 9600), especially when the baudrate is not (near) an integer fraction of the samplerate.
- Before, the analyzer also took care of normalizing the displayed baud rate to one of the standard ones and normalizing the baud rate passed to the async data decoder to a fraction of the sample rate. - Now, when the user enters a non-standard baudrate, it is actually displayed as entered (normalization to standard baud rates is still used when auto-detecting). - Now, when the user enters a non-standard baudrate, it is actually passed as entered to the async data decoder (which currently does the same fraction of samplerate normalization, but this will change next).
…coder. - Previously, the bit length calculated by the BaudRateAnalyzer was used for this. However, this bit length was used to calculate the baud rate, which was used by the data decoder again to calculate the actual bit length to use. - This commit should not change any behaviour, since these two bit lengths should be the same. - This commit prepares for subsequent commits, which allow these values to become different and/or allow running without a BaudRateAnalyzer at all.
- Previously, this baudrate was set explicitely by UARTAnalyserTask. Now it is calculated based on the bit length set by UARTAnalyserTask. This also means that the bit length averaging code (e.g., taking the average bit length between TX and RX lines) is actually used now, which could improve the exact baudrate calculation.
- diff is the result of Math.abs, it can never be negative.
- This was broken a few commits ago by changes in the inverting behaviour. Now, we introduce the proper support for inverting bits when reading them, instead of as a post-processing step on the complete byte, which makes sure the parity bit is also properly inverted before checking.
- This makes the sampling of bits happen in single place in a consistent way, preparing for upcoming commits. No actual behaviour should be modified by this commit, effectively only code is moved around.
- Instead of checking each stop bit separately, it now regards the stop bits more like a stop period: the value is checked during the first bit length and then the length of the stop period is checked by finding the next start bit. This change prepares for a next change, which has a bit of trouble handling the value of half bits properly (which is now no longer needed). - As an extra bonus, this commit also prevents decoding bytes after endOfDecode. The previous code would check if there was still enough room for an entire byte after the previous byte, now the check changed to see if there is enough room after the start bit, which makes more sense.
- The getDataValue method inverted all signals, but isMark and isSpace inverted the value again, meaning a space is always low voltage and a mark is always high voltage. The start bit detection also corrected this inversion, so a start bit is always a space/low voltage. - Then, the data bits themselves are inverted again, which is essentially the only inversion necessary. - The parity bits used to compare the three-times inverted databits with the one-time inverted bit from getDataValue / isExpectedLevel. Now that getDataValue no longer inverts, the parity calculation is wrong when inverting. This will be fixed later on. - Note that the invert setting only effectively inverts the databits. This might not be what it intended to do, but that can be corrected in a later commit.
…r comboboxes a crash occurs.
…ctoring to DM it no longer called certain init methods. This could lead to NPEs in certain situations.
…w reuse in other bundles.
…oring going on. Still massive bugs to fix.
- it compiles, and runs, but not everything works yet; - the docking windows don't yet appear (not enabled yet); - there are some redundancies in code left; - and other bugs to be fixed.
…akes the baudrate editor simpler and more user-friendlier.