Add checkbox to USBSlave properties screen

Forum for suggestions regarding the next update / release of Flowcode

Moderators: Benj, Mods

Post Reply
kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Add checkbox to USBSlave properties screen

Post by kersing »

Hi,

In the USBSlaves SlaveProperty TAB one has to specify a Slave Service Macro Name, even when no slave service is being used. If no macro name is supplied the code generated for FCD_USBSlave0_Start_Slave_Service is invalid. Without a macro name there are a lot of FCM_(...params...) calls in the generated code. When a macro is supplied (dummy_macro) those are FCM_dummy_macro(...parms...) calls.

Adding a checkbox to the tab (with the appropriate #ifdef in the C code) could solve this minor inconvenience.

Best regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Add checkbox to USBSlave properties screen

Post by Benj »

Hi Jac

You are right a use of a #if statement could be used to remove the missing property bug that causes the error in compilation. However I think the current error is actually quite useful as it confirms that the USB component is not configured correctly. As USB is a fairly tricky one to troubleshoot it may take a while for a user to detect that a property is causing their program to run correctly if the program actually compiles correctly.

It may be possible to enhance the USB component to allow for a better method of selecting the run time macro though so I will look into this for you.

Keep the suggestions coming we do appreciate them.

Post Reply