BRT Community

General Category => Discussion - EVE => Topic started by: Rudolph on August 22, 2020, 01:39:53 PM

Title: Bug: invalid options in commands are handled badly
Post by: Rudolph on August 22, 2020, 01:39:53 PM
I am currently rewriting parts of my code library and as part of this I am trying out all the commands that I rewrite.
Oh yes, I am using a BT815 right now.

Currently at cmd_toggle I somehow had the idea to feed it unsupported parameter options.
Listed as having an effect on cmd_toggle are OPT_3D and OPT_FLAT.
And of course, these do work just fine.

OPT_MONO -> black screen
OPT_NODL -> black screen
OPT_CENTERX -> black screen
OPT_CENTERY -> black screen
OPT_RIGHTX -> black screen
OPT_NOBACK -> no effect
OPT_FILL -> black screen
OPT_FLASH -> black screen
OPT_NOTICKS -> black screen
OPT_NOHM -> black screen
OPT_NOSECS -> black screen
OPT_NOTEAR -> black screen
OPT_FULLSCREEN -> black screen
OPT_MEDIAFIFO -> black screen
OPT_SOUND -> black screen

The options I left out either are alias ones use the same values or combinations of those above.
I have no idea how OPT_NOBACK has no effect but any other options makes EVE fail.

Please make the command co-processor filter out invalid options in BT817 and beyond.
And for all commands that take options.
Title: Re: Bug: invalid options in commands are handled badly
Post by: BRT Community on August 24, 2020, 03:56:49 PM
Hello,

Thanks for the feedback!
Our normal suggestion would be to do error checking for invalid parameters within the code library.
however I will pass this on to the development team to see if such a feature can be added for future revisions of EVE.

Best Regards,
BRT Community
Title: Re: Bug: invalid options in commands are handled badly
Post by: Rudolph on August 24, 2020, 07:14:13 PM
Our normal suggestion would be to do error checking for invalid parameters within the code library.

While one could add parameter checking to the calling function, that does not make the implementation of the called
function any more robust.
So no, parameter checking should be in the function that is called or at least a wrong parameter should
not lead to desaster like in this case a black screen.
Title: Re: Bug: invalid options in commands are handled badly
Post by: BRT Community on August 25, 2020, 01:39:01 PM
Hello,

The BT81x programmers guide does state that "The behavior of widgets is not defined if the parameter values are out of the valid range", but I have passed your suggestion on to the development team.

Best Regards.
BRT Community
Title: Re: Bug: invalid options in commands are handled badly
Post by: Kaetemi on September 09, 2020, 01:26:28 PM
any other options makes EVE fail.

Actually, the coprocessor will flag a fault.
"ERROR: illegal option in cmd_toggle()"
It's rather strict on invalid commands since BT815.

Maybe a register option to make it more lenient could be handy in future versions?
Title: Re: Bug: invalid options in commands are handled badly
Post by: BRT Community on September 09, 2020, 03:56:26 PM
Hello,

Thanks I will pass this on to the dev team for their consideration!

Maybe a register option to make it more lenient could be handy in future versions?

Best Regards,
BRT Community
Title: Re: Bug: invalid options in commands are handled badly
Post by: Rudolph on October 20, 2020, 05:09:44 PM
This is confirmed as a bug in FT4222_I2CMaster_Write.

No, it is not, please check where you post before you do.

Quote
Best Regards,
FTDI Community

I kind of doubt that your footer is legit and this is not the FTDI Community here.
Title: Re: Bug: invalid options in commands are handled badly
Post by: BRT Community Admin on October 21, 2020, 09:34:18 AM
Thanks Rudolph,

Previous response has now been removed.


best regards

BRT Community Admin