Ardupilot example code does not behave as I expected

Hello.

I’m very interested with Ardupilot Code. Always thank you for you expert’s answers.

I ran “AP_Notify_test.cpp” for knowing how ardupilot’s buzzer works.

before run buzzer, I tried to modify the code to print some phrases for prior test, and it didn’t work.

I added below code in the loop :

hal.console->printf("AP_Notify library test\n");

However, it didn’t work.

below is the video and full code :

/*
 *       Example of AC_Notify library .
 *       DIYDrones.com
 */

#include <AP_HAL/AP_HAL.h>
#include <AP_Notify/AP_Notify.h>          // Notify library
#include <AP_Notify/AP_BoardLED.h>        // Board LED library
#include <AP_Notify/Buzzer.h>             // Buzzer Library

void setup();
void loop();

const AP_HAL::HAL& hal = AP_HAL::get_HAL();

#if AP_NOTIFY_GPIO_LED_3_ENABLED
// create board led object
AP_BoardLED board_led;
#endif

//Buzzer board_buzzer;

void setup()
{
    hal.console->printf("AP_Notify library test\n");

#if AP_NOTIFY_GPIO_LED_3_ENABLED
    // initialise the board leds
    board_led.init();
#endif
    //board_buzzer.init();

    // turn on initialising notification
    AP_Notify::flags.initialising = true;
    AP_Notify::flags.gps_status = 1;
    AP_Notify::flags.armed = 1;
    AP_Notify::flags.pre_arm_check = 1;
}

void loop()
{
    //board.buzzer.play_pattern(SINGLE_BUZZ);
    hal.console->printf("AP_Notify library test\n");
    hal.scheduler->delay(5000);
}

AP_HAL_MAIN();

Problem solved.

I was editing wrong file.

I confused Visual Studio Code’s copy and paste system. that was the cause of the problem.