/PIC Stuff/Cerebot_32MX7_LED_Cube/CUBE.c |
---|
422,8 → 422,13 |
Cube_Rotate_Shell(3, direction); |
} |
cube_data_ptr->rotation_counter = (cube_data_ptr->rotation_counter == CUBE_ROTATIONS-1) |
? 0 : cube_data_ptr->rotation_counter + 1; |
if (direction == 0) { |
cube_data_ptr->rotation_counter = (cube_data_ptr->rotation_counter == CUBE_ROTATIONS - 1) |
? 0 : cube_data_ptr->rotation_counter + 1; |
} else { |
cube_data_ptr->rotation_counter = (cube_data_ptr->rotation_counter == 0) |
? CUBE_ROTATIONS - 1 : cube_data_ptr->rotation_counter - 1; |
} |
} |