Nach Update auf 25.05.1 werden lokale TCL nicht mehr verarbeitet

  • Hallo zusammen,

    nachdem beim letzten Update die ganze TCL-Geschichte neu strukturiert wurde, werden meine lokalen
    Änderungen nicht mehr verarbeitet und svxlink startet auch nicht mehr. Leider kann ich mit der Antwort
    nicht viel anfangen, da in dieser Materie ebsolut nicht tief drin bin.

    In /usr/share/svxlink/events.d/lokal liegt die Datei "RepeaterLogic.tcl", mit folgendem Inhalt:

    #
    # A constant that indicates the minimum time in seconds to wait between two
    # identifications. Manual and long identifications is not affected.
    #
    variable Logic::min_time_between_ident 120;

    #
    # Executed when the repeater is activated
    # reason - The reason why the repeater was activated
    # SQL_CLOSE - Open on squelch, close flank
    # SQL_OPEN - Open on squelch, open flank
    # CTCSS_CLOSE - Open on CTCSS, squelch close flank
    # CTCSS_OPEN - Open on CTCSS, squelch open flank
    # TONE - Open on tone burst (always on squelch close)
    # DTMF - Open on DTMF digit (always on squelch close)
    # MODULE - Open on module activation
    # AUDIO - Open on incoming audio (module or logic linking)
    # SQL_RPT_REOPEN - Reopen on squelch after repeater down
    #
    proc RepeaterLogic::repeater_up {reason} {
    global mycall;
    global active_module;
    variable repeater_is_up;
    variable now;

    set repeater_is_up 1;

    if {($reason != "SQL_OPEN") && ($reason != "SQL_RPT_REOPEN")} {
    set now [clock seconds];
    if {$now-$Logic::prev_ident < $Logic::min_time_between_ident} {
    return;
    }
    set Logic::prev_ident $now;
    spellWord $mycall;
    playSilence 500;

    if {$active_module != ""} {
    puts "$active_module";
    playMsg "EchoLink" "name";
    playMsg "Core" "active";
    }
    }
    }

    #
    # Executed when there has been no activity on the repeater for
    # IDLE_SOUND_INTERVAL milliseconds. This function will be called each
    # IDLE_SOUND_INTERVAL millisecond until there is activity or the repeater
    # is deactivated.
    # Das ist das Idle-Zeichen, 5 Sekunden vor TX aus
    #
    proc RepeaterLogic::repeater_idle {} {
    CW::setAmplitude -20;
    CW::play "K";
    }


    #
    # Executed when the SvxLink software is started
    #
    proc Logic::startup {} {
    CW::setCpm 100;
    CW::setPitch 1000;
    CW::setAmplitude 0;
    SelCall::setMode "ZVEI1";
    SelCall::setAmplitude 150;
    SelCall::setFirstToneLength 500;
    SelCall::play "12345";
    }

    #
    # Executed when a manual identification is initiated with the * DTMF code
    #
    proc Logic::manual_identification {} {
    global mycall;
    global report_ctcss;
    global active_module;
    global loaded_modules;
    variable CFG_TYPE;
    variable epoch;
    variable prev_ident;
    variable min_time_between_ident;

    set epoch [clock seconds];
    set hour [clock format $epoch -format "%k"];
    regexp {([1-5]?\d)$} [clock format $epoch -format "%M"] -> minute;
    if {$epoch - $prev_ident < $min_time_between_ident} {
    return;
    }

    set prev_ident $epoch;
    spellWord "DB0LHR";
      
    if {$report_ctcss > 0} {
    playMsg "Core" "pl_is";
    playNumber $report_ctcss;
    playMsg "Core" "hz";
    playSilence 300;
    }
    if {$active_module != ""} {
    playMsg "Core" "active_module";
    playMsg $active_module "name";
    playSilence 250;
    set func "::";
    append func $active_module "::status_report";
    if {"[info procs $func]" ne ""} {
    $func;
    }
    } else {
    foreach module [split $loaded_modules " "] {
    set func "::";
    append func $module "::status_report";
    if {"[info procs $func]" ne ""} {
    $func;
    }
    }
    }
    playMsg "Default" "press_0_for_help";
    playSilence 250;
    }

    #
    # Executed when a long identification (e.g. hourly) should be sent
    # hour - The hour on which this identification occur
    # minute - The hour on which this identification occur
    #
    proc Logic::send_long_ident {hour minute} {
    global mycall;
    global loaded_modules;
    global active_module;
    variable CFG_TYPE;

    spellWord $mycall;
    if {$CFG_TYPE == "Simplex"} {
    playMsg "EchoLink" "link";
    } elseif {$CFG_TYPE == "Repeater"} {
    playMsg "EchoLink" "repeater";
    }
    playSilence 500;

    # Info: 4 nächste Zeilen sind für die stündliche Zeitansage da!!!
    # playMsg "Core" "the_time_is";
    # playSilence 100;
    # playTime $hour $minute;
    # playSilence 500;

    # Call the "status_report" function in all modules if no module is active
    if {$active_module == ""} {
    foreach module [split $loaded_modules " "] {
    set func "::";
    append func $module "::status_report";
    if {"[info procs $func]" ne ""} {
    $func;
    }
    }
    }
      
    playSilence 500;
    }


    Was will ich gegenüber der Originalkonfiguration anders haben?

    - beim Starten wird eine ZVEI1-Tonfolge ausgegeben, dann weiss ich sofort nach einem Start, ob die Software auch läuft und ich muss das Relais nicht extra auftasten (lief seit Jahren ufb!)

    - bevor das Relais abfällt, kommst statt dem grausigen Ton ein CW-K

    - ist der Repeater lange genug abgefallen, kommt nach dem Auftasten die Kennung in Sprache (default nommt keine Kennung)

    - die stündliche Zeitansage findet NICHT statt (unsere Kiste rennt in UTC, da wird man dann immer gefragt, ob die Rechneruhr falsch läuft ?!?!?!

    Auf diese Nachricht in der Mailingliste hat mir Tobias das geschrieben:

    Yes those overrides are not correctly written but worked in the old system anyway.

    • You should not need to copy any variable declarations unless you want to change the default value
    • You should separate Logic overrides and RepeaterLogic overrides in two different files
    • Each file should have a "namespace eval" line at the top
    • No proc declarations should be prefixed with a namespace
    • If overriding the Logic::startup function you need to call the original one

    It should look something like the code below. I have stripped it down to a skeleton to not hide the structure in details.

    Logic.tcl

    RepeaterLogic.tcl

    73 de Pat, DL1GHN