Jump to content

Changing a variable in another class


photo

Recommended Posts

Posted

 

I directly access and change the variables of the TouchBox class in the UH60_Cockpit class, but it is not changed in the Update statement of the TouchBox class.

May I know why not?

image.png.592a12fd8caee260f7ee6fbb2cae4aa0.png TouchBox.h

 

image.png.a3ff1a4faac88e5e378ce808748a83cb.png: TouchBox.cpp image.png.dd75fb678e0eece8ddf4302739629a55.png : UH60_Cockput.cpp

Posted

Hello! 

it is not clear for this code what is happening:
- what is type of "catchball"?
- catchball from uh60 and touchbox::update it is the same instance? maybe there are few different components and you are testing another?
- carrybutton_on is boolean type, but you are print %f like floating number. try to use %d instead

×
×
  • Create New...