When '.probe alli' is set, disable auto bridging and set a flag

This commit is contained in:
Holger Vogt 2023-03-24 18:23:24 +01:00
parent ce38a768b5
commit 062785319a
2 changed files with 19 additions and 1 deletions

View File

@ -9822,6 +9822,19 @@ static void inp_check_syntax(struct card *deck)
controlled_exit(EXIT_BAD);
}
/* When '.probe alli' is set, disable auto bridging and set a flag */
for (card = deck; card; card = card->nextcard) {
char* cut_line = card->line;
if (ciprefix(".probe", cut_line) && search_plain_identifier(cut_line, "alli")) {
int i = 0;
bool bi = TRUE;
cp_vset("auto_bridge", CP_NUM, &i);
cp_vset("probe_alli_given", CP_BOOL, &bi);
break;
}
}
for (ii = 0; ii < 10; ii++)
subs[ii] = NULL;

View File

@ -667,8 +667,13 @@ bool Evtcheck_nodes(
int nl;
if (strcmp(event_node->name, analog_node->name) == 0) {
if (show == AB_OFF)
if (show == AB_OFF) {
if (cp_getvar("probe_alli_given", CP_BOOL, NULL, 0))
fprintf(stderr, "\nDot command '.probe alli' and digital nodes are not compatible.\n");
FREE(errMsg);
errMsg = copy("Auto bridging is switched off");
return FALSE; // Auto-bridge disabled
}
bridge = find_bridge(event_node, ckt, &bridge_list);
if (!bridge) {
/* Fatal, circuit cannot run. */