Using relealsed function in VCS

#1

When using the released function in VCS the API shows this format released(void(*callback)(void)) and i get an error using just this that says error: invalid operands to binary expression (‘bool’ and ‘void’) and cant figure out what i should do to resolve this issue
if (Controller1.ButtonL1.released()) {
random code
}

0 Likes

#2

intstead of:


Controller1.ButtonL1.released() 

use


!Controller1.ButtonL1.pressing()

0 Likes

#3

For some added clarity, .released is for use with event handlers. It looks for when the button is released and only fires off once. It does not check let you know about it not being held down, though. You stick a function into this, that function being activated when a held-down button becomes no longer held down.

0 Likes