From 9478c3263de02c8dca9856796d3809e3d63fb123 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 22 May 2023 16:39:24 +0200 Subject: [PATCH] Try to find default roster entry --- GITHUB_SHA.h | 2 +- WiThrottle.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index 8db811c..bc74cd0 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "devel-202305211819Z" +#define GITHUB_SHA "devel-202305221431Z" diff --git a/WiThrottle.cpp b/WiThrottle.cpp index aa92dc6..c77c1ef 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -573,7 +573,11 @@ void WiThrottle::sendFunctions(Print* stream, byte loco) { #ifdef EXRAIL_ACTIVE const char * functionNames=(char *) RMFT2::getRosterFunctions(locoid); if (!functionNames) { - // no roster, use non-exrail presets as above + // no roster entry for locoid, try to find default entry + functionNames=(char *) RMFT2::getRosterFunctions(0); + } + if (!functionNames) { + // no default roster entry either, use non-exrail presets as above } else if (GETFLASH(functionNames)=='\0') { // "" = Roster but no functions given