Hi JD,

You are correct, that was left over code from a while ago that had not been 
properly updated (because we usually do not enable use of the Irrklang 
library). I pushed a fix.

Thanks for pointing this out.
--Radu

From: [email protected] <[email protected]> On Behalf 
Of J D
Sent: Tuesday, August 22, 2023 12:48 AM
To: ProjectChrono <[email protected]>
Subject: [chrono] Compile Error, missing powertrainA

Hi all,

I'm *very* new to this, but noticed on my build that I was having an error in 
ChronoEngine_vehicle_irrlicht that couldn't find a reference to "PowertrainA"

In this file: 
C:\workspace\chrono\src\chrono_vehicle\ChVehicleVisualSystemIrrlicht.cpp
At lines 209 and 211 - connected with the Irrklang module.

I don't know enough about Github to submit a commit/suggestion.
I altered these to what I could find on 
https://api.projectchrono.org/classchrono_1_1vehicle_1_1_ch_powertrain_assembly.html

I believe GetPowerTrainAssembly() is what was supposed to be called?

------------------------------------------------------


#ifdef CHRONO_IRRKLANG
    static int stepsbetweensound = 0;

    // Update sound pitch
    if (m_car_sound && m_vehicle->GetPowertrainA()) {
        stepsbetweensound++;
        double engine_rpm = 
m_vehicle->GetPowertrainA()->GetEngine()->GetMotorSpeed() * 60 / CH_C_2PI;
        double soundspeed = engine_rpm / (4000.);  // denominator: to guess
        if (soundspeed < 0.1)
            soundspeed = 0.1;
        if (stepsbetweensound > 20) {
            stepsbetweensound = 0;
            if (m_car_sound->getIsPaused())
                m_car_sound->setIsPaused(false);
            m_car_sound->setPlaybackSpeed((irrklang::ik_f32)soundspeed);
        }
    }
#endif
}
--
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/14b41343-4330-4604-a20d-ae97b7b4ddb1n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/14b41343-4330-4604-a20d-ae97b7b4ddb1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237758585E742F7A0EC94D4A7E1A%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to