Index: excitation.c =================================================================== --- excitation.c (nonexistent) +++ excitation.c (revision 24593) @@ -0,0 +1,32 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2019 Tibor 'Igor2' Palinkas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#include "config.h" + +static const char *pcb_openems_excitation_get(pcb_board_t *pcb) +{ + return "DUMMY_EXCITATION"; +} Index: export_openems.c =================================================================== --- export_openems.c (revision 24592) +++ export_openems.c (revision 24593) @@ -58,6 +58,8 @@ const char *openems_cookie = "openems HID"; +#include "excitation.c" + #define MESH_NAME "openems" typedef struct hid_gc_s { @@ -144,13 +146,9 @@ PCB_HATT_INTEGER, 0, 10, {0, 0, 0}, 0, 0}, #define HA_base_prio 12 - {"excite", "Excite directive", - PCB_HATT_STRING, 0, 0, {0, "SetGaussExcite(FDTD, f0, fc)", 0}, 0, 0}, -#define HA_excite 13 - {"port-resistance", "default port resistance", PCB_HATT_REAL, 0, 1000, {0, 0, 50}, 0, 0} -#define HA_def_port_res 14 +#define HA_def_port_res 13 }; @@ -174,7 +172,6 @@ } TODO(": when export dialogs change into DAD, this hack to convert the strings to allocated ones will not be needed anymore") - openems_attribute_list[HA_excite].default_val.str_value = pcb_strdup(openems_attribute_list[HA_excite].default_val.str_value); openems_attribute_list[HA_def_copper_cond].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_copper_cond].default_val.str_value); openems_attribute_list[HA_def_subst_epsilon].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_epsilon].default_val.str_value); openems_attribute_list[HA_def_subst_mue].default_val.str_value = pcb_strdup(openems_attribute_list[HA_def_subst_mue].default_val.str_value); @@ -525,10 +522,8 @@ fprintf(ctx->fsim, "%%%%%% Board mesh, part 1\n"); fprintf(ctx->fsim, "unit = 1.0e-3;\n"); - fprintf(ctx->fsim, "f0 = 1.1e9; %% pulse center frequency\n"); - fprintf(ctx->fsim, "fc = 0.9e9; %% \"20dB cutoff frequency --> bandwidth is 2*fc\n"); fprintf(ctx->fsim, "FDTD = InitFDTD();\n"); - fprintf(ctx->fsim, "FDTD = %s;\n", ctx->options[HA_excite].str_value); + fprintf(ctx->fsim, "FDTD = %s;\n", pcb_openems_excitation_get(ctx->pcb)); if (mesh != NULL) {