BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Bug: invalid options in commands are handled badly  (Read 11642 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Bug: invalid options in commands are handled badly
« 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.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #1 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
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #2 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.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #3 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
Logged

Kaetemi

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #4 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?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #5 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
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #6 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.
Logged

BRT Community Admin

  • Administrator
  • Newbie
  • *****
  • Posts: 16
    • View Profile
Re: Bug: invalid options in commands are handled badly
« Reply #7 on: October 21, 2020, 09:34:18 AM »

Thanks Rudolph,

Previous response has now been removed.


best regards

BRT Community Admin
Logged