From cd1b425a8026ce74a339f29896494f7b465b6b14 Mon Sep 17 00:00:00 2001 From: Fabien Corona Date: Sat, 18 Feb 2023 00:38:46 +0000 Subject: [PATCH] sim: VSIN - allow user to specify a phase TD is not the same as PHASE. TD is the delay before the source turns on. PHASE is ... the phase If only TD is set, the signal starts later, but the phase is still 0 when compared to the t=0 of the simulation. (cherry picked from commit 39a1b14a0f4fdeaf70fc5f93787e96a835c0cce0) --- eeschema/sim/sim_model_source.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eeschema/sim/sim_model_source.cpp b/eeschema/sim/sim_model_source.cpp index 4911c01a81..3709c4441f 100644 --- a/eeschema/sim/sim_model_source.cpp +++ b/eeschema/sim/sim_model_source.cpp @@ -397,15 +397,13 @@ std::vector SIM_MODEL_SOURCE::makeSinParamInfos( std::st paramInfo.description = "Damping factor"; paramInfos.push_back( paramInfo ); - // "phase" is not needed. "td" is enough. - - /*paramInfo.name = "phase"; + paramInfo.name = "phase"; paramInfo.type = SIM_VALUE::TYPE_FLOAT; paramInfo.unit = "°"; paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL; paramInfo.defaultValue = "0"; paramInfo.description = "Phase"; - paramInfos.push_back( paramInfo );*/ + paramInfos.push_back( paramInfo ); appendAcParamInfos( paramInfos, aUnit ); return paramInfos;