(Elisa-3) Is it possible to return a value from a library to the main code?

I'm trying to program an odometry function into an Elisa-3 robot (for information about these, click HERE).

Unfortunately, the only odometry function I can find is one for automatic calibration (seen in motors.c) so I want to add one of my own. I believe the easiest way to do so is to modify the library code in behaviors.c so that it also stores the total distance travelled in each direction before the robot turns (to avoid obstacles and cliffs - each act is its own method).

Is there any way to return such values to the main code (Elisa3.ino) whenever either of those methods are called?

Thank you in advance.

behaviors.c (4.17 KB)

motors.c (37.2 KB)

elisa3.ino (3.44 KB)

Which specific methods are you talking about?

void obstacleAvoidance() and char cliffDetected() in behaviors.c,
handleCalibration and updateOdomData from motors.c.

Thank you. Here are the .h files they use:

behaviors.h (2.16 KB)

motors.h (2.42 KB)