Hi Uwe, I've uploaded some example files containing traces of the SDA2506 protocol here: https://test.luelistan.net/sigrok/tests/
I removed the print statements and added a self.reset() in the except block where missing command bits are handled. https://github.com/max-weller/libsigrokdecode/commit/5ccb6b23dd6c93bbc83fba5545e6488e42f6a296 I couldn't find other cases where exceptions are thrown/caused, are there any specific problems? Yours, Max Am 12.02.2018 um 16:39 schrieb Uwe Hermann: > Hi, > > On Tue, Jan 30, 2018 at 11:27:47PM +0100, Max Weller wrote: >> I built a protocol decoder for the SDA2506 EEPROM. You can find it on my >> Github fork at >> https://github.com/max-weller/libsigrokdecode/commit/edd4ec248de35d750681deeedab6e40f560ebdce >> >> Feel free to add it to the decoders folder. > Looks great, thanks a lot! > > Do you have an example *.sr file for our sigrok-dumps repository? We > usually use this to review/test/regression-test decoders. There's also > a sigrok-test repository where you can add explicit tests for this > decoder (these use *.sr files from sigrok-dumps) if you have some time. > > As for the decoder, this should be mergeable soonish, just a few quick > comments: > > - Please remove all "print" statements, decoders should never use that. > If it's something the user should see those can become annotations, > and if it was temporary debug stuff it can be removed once the decoder > is "finished". > > - The decoder should generally not throw/cause exceptions but rather > "gracefully" handle unexpected input by resetting its state machine > or such. We only have very few cases that should be handled via > exceptions (see other PDs), e.g. missing samplerate or missing > channels. > > > Cheers, Uwe. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel