Instuction confusing

Hello,
im confusing about a commented "howto" in this sketch:

// -- The following flags can be used to rotate/flip the output, just uncomment the desired swap/flip
// define this to swap X and Y on the DAC
#define 1_SWAP_XY
// define this to flip along the x axis
#define 1_FLIP_X
// define this to flip along the y axis
#define 1_FLIP_Y

Can anybody tell me what i have to "uncomment" ? in my opinion all 3 options are already uncommented !

Regards Frank

Can anybody tell me what i have to "uncomment" ? in my opinion all 3 options are already uncommented !

You are correct. Maybe the solution to this is in the rest of the code. It might be that you have to define a value to activate, so just the documentation is wrong. But given just above information I fully agree with you.

@pylon:

this is Laser.h >

// -- The following flags can be used to rotate/flip the output, just uncomment the desired swap/flip
// define this to swap X and Y on the DAC
#define 1_SWAP_XY
// define this to flip along the x axis
#define 1_FLIP_X
// define this to flip along the y axis
#define 1_FLIP_Y

i found the define in Laser.cpp>

void Laser::sendToDAC(int x, int y)
{
#ifdef 1_SWAP_XY
int x1 = y;
int y1 = x;
#else
int x1 = x;
int y1 = y;
#endif
#ifdef 1_FLIP_X
x1 = 4095 - x1;
#endif
#ifdef 1_FLIP_Y
y1 = 4095 - y1;
#endif
dac.output2(x1, y1);
}

what should i modify to flip ? Can you help?

Regards Frank

You uncomment it to make it active. Conversely, you comment it to make it inactive. Thus this:

#define 1_SWAP_XY

swaps X and Y but this

//#define 1_SWAP_XY

doesn’t.

Pete

ok, Pete understand. Thank you for fast answer, i will test this ! :slight_smile:

And tomorrow’s lesson will be using tags when posting code, or tags for other mono-spaced text.