~aleteoryx/muditaos

e75225423836240de0024badee93bddca24d4f0c — Adam Dobrowolski 3 years ago b232c97
[MOS-460] Call starting - no audio beep when calling

Fixed
M module-services/service-cellular/call/CallMachine.hpp => module-services/service-cellular/call/CallMachine.hpp +3 -3
@@ 185,6 185,7 @@ namespace call
            call.record.phoneNumber = start.number;
            call.record.date        = std::time(nullptr);

            di.audio->routingStart();
            di.db->startCall(call.record);
            di.gui->notifyCallStarted(call.record.phoneNumber, call.record.type);
            di.sentinel->HoldMinimumFrequency(bsp::CpuFrequencyMHz::Level_6);


@@ 195,7 196,6 @@ namespace call
    {
        void operator()(Dependencies &di, CallData &call)
        {
            di.audio->routingStart();
            di.timer->start();
        }
    } constexpr HandleStartedCall;


@@ 289,8 289,8 @@ namespace call
                // outgoing call: Pure is Ringing (called from: handleCellularRingingMessage)
                "Idle"_s + boost::sml::event<evt::StartCall> / HandleStartCall = "Starting"_s,

                "Starting"_s + boost::sml::event<evt::Ended> / HandleEndCall      = "Ongoing"_s,
                "Starting"_s + boost::sml::event<evt::Reject> / HandleEndCall     = "Ongoing"_s,
                "Starting"_s + boost::sml::event<evt::Ended> / HandleEndCall      = "Idle"_s,
                "Starting"_s + boost::sml::event<evt::Reject> / HandleEndCall     = "Idle"_s,
                "Starting"_s + boost::sml::event<evt::Answer> / HandleStartedCall = "Ongoing"_s,

                "Ringing"_s + boost::sml::event<evt::Answer> / HandleAnswerCall                 = "Ongoing"_s,

M module-services/service-cellular/call/tests/test-CallMachine.cpp => module-services/service-cellular/call/tests/test-CallMachine.cpp +1 -0
@@ 357,6 357,7 @@ TEST_CASE("call outgoing - ended, before answered")
    auto machine = std::make_unique<call::StateMachine>(di.get());

    REQUIRE(machine->machine.process_event(call::event::StartCall{CallType::CT_OUTGOING, number.getView()}));
    fakeit::Verify(Method(di.audio, routingStart)).Exactly(1);
    fakeit::Verify(Method(di.audio, play)).Exactly(0);
    REQUIRE(machine->machine.process_event(call::event::Ended{}));
    fakeit::Verify(Method(di.audio, stop)).Exactly(1);