![]() |
[FTC]: [FTC] putting two selector values in a case structure
I'm trying to put two selector values in a case structure so they work together for example, when using a button event how would i change the case structure so that a motor would not move until i pressed two buttons such as pressing buttons 7 and 8 to move a motor. i currently only know how to have it set to one button but as our mechanisms can only be deployed once i want to program it so it will only deploy after pressing two buttons h ow would i do this?
|
Re: [FTC]: [FTC] putting two selector values in a case structure
How were you planning to use case statements for button presses even without the two button scenario?
I ask because the different buttons being pressed are not mutually exclusive and it is not clear to me what value you'd even be switching on. You may be better off using if/else statements for the logic you've described? |
you can use boolean operators like this,
if ((button(7)&&button(8))=true) then{ do stuff} else go on with life |
Re: [FTC]: [FTC] putting two selector values in a case structure
1 Attachment(s)
The attached snippet should do what you are asking:
|
| All times are GMT -5. The time now is 18:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi