Help Understanding ArduCopter code Internals for Custom Drone Project

Hello everyone,

First of all, thank you for this fantastic software — live long and prosper!
I’m currently working on a hobby project that involves building a kind of “drone-transformer”. As part of this, I’m modifying the ArduCopter V4.7.0-dev source code to support the features I need.
During development, I’ve come across several parts of the codebase that I’d like to understand more deeply in order to implement my features correctly. I’d greatly appreciate any clarifications you can provide on the questions below — even partial answers would be very helpful.

Class AP_MotorsTri.cpp for Tricopters.
From my understanding a call below should set up max allowed angle of a servo.
SRV_Channels::set_angle(SRV_Channels::get_motor_function(AP_MOTORS_CH_TRI_YAW), _yaw_servo_angle_max_deg*100);

Why does it have a call both in methods “init” and “output_armed_stabilizing” ?
Why can’t we just set this angle range in the “init” method ?

method “output_armed_stabilizing” also contains call

_yaw_servo_angle_max_deg.set(constrain_float(_yaw_servo_angle_max_deg, AP_MOTORS_TRI_SERVO_RANGE_DEG_MIN, AP_MOTORS_TRI_SERVO_RANGE_DEG_MAX));

It is not duplicated elsewhere, but in general the question is similar, why is it done in “output_armed_stabilizing” not in the “init” method ?

I’m running MAVProxy with GUI using:
./mavproxy.py --console

This allows to open the “Servo Output” window showing real-time PWM values, which means ArduPilot is sending this data from the motor library or a related modules.
I’d like to output custom debug values from the motor library in a similar way.
Right now, I’m using a workaround: I define fake servos on channels 14–16 and map my debug values to fake servo angles, then interpret them on the GUI.
It works, but feels uncomfortable.

Is there a cleaner way to send custom values from the Motor library to MAVProxy ?
Note: I’m mainly asking about changes within ArduPilot — changes in MAVProxy are out of scope, though tips are welcome.

Class AP_AHRS define variables :

    float roll;
    float pitch;
    float yaw;

Class AP_AHRS_View that suppose to be a wrapper of AP_AHRS define variables

    float roll;
    float pitch;
    float yaw;

as well.

What is a point to duplicated them in base and View classes ?
If I need a real current roll angle of a drone should I use roll from AP_AHRS or AP_AHRS_View ?