@@ -780,6 +780,8 @@ void config_init (char *fname, struct audio_s *p_audio_config,
780
780
p_audio_config -> achan [channel ].sanity_test = SANITY_APRS ;
781
781
p_audio_config -> achan [channel ].passall = 0 ;
782
782
783
+ p_audio_config -> achan [channel ].interlock = 0 ;
784
+
783
785
for (ot = 0 ; ot < NUM_OCTYPES ; ot ++ ) {
784
786
p_audio_config -> achan [channel ].octrl [ot ].ptt_method = PTT_METHOD_NONE ;
785
787
strlcpy (p_audio_config -> achan [channel ].octrl [ot ].ptt_device , "" , sizeof (p_audio_config -> achan [channel ].octrl [ot ].ptt_device ));
@@ -1729,6 +1731,33 @@ void config_init (char *fname, struct audio_s *p_audio_config,
1729
1731
}
1730
1732
}
1731
1733
1734
+ /*
1735
+ * INTERLOCK n
1736
+ *
1737
+ * Interlocks channels with the same interlock number (n) to share DCD and PTT signaling.
1738
+ * Useful with several setup types where 2 or more channels shouldn't interfere with eachother.
1739
+ * For example when radios and/or antennas are shared.
1740
+ */
1741
+
1742
+ else if (strcasecmp (t , "INTERLOCK" ) == 0 ) {
1743
+ int n ;
1744
+ t = split (NULL ,0 );
1745
+ if (t == NULL ) {
1746
+ text_color_set (DW_COLOR_ERROR );
1747
+ dw_printf ("Line %d: Missing number for INTERLOCK command.\n" , line );
1748
+ continue ;
1749
+ }
1750
+ n = atoi (t );
1751
+ if (n >= 0 && n <= MAX_INTERLOCKS ) {
1752
+ p_audio_config -> achan [channel ].interlock = n ;
1753
+ }
1754
+ else {
1755
+ p_audio_config -> achan [channel ].interlock = 0 ;
1756
+ text_color_set (DW_COLOR_ERROR );
1757
+ dw_printf ("Line %d: Invalid number for INTERLOCK. Using %d.\n" ,
1758
+ line , p_audio_config -> achan [channel ].interlock );
1759
+ }
1760
+ }
1732
1761
1733
1762
/*
1734
1763
* PTT - Push To Talk signal line.
0 commit comments