diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp index e8ba15013..5b7da761d 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodsink.cpp @@ -348,7 +348,8 @@ void MeshtasticDemodSink::tryHeaderLock() { const std::vector baseHeaderSlice(symbols.begin() + offset, symbols.begin() + offset + 8U); - for (int delta = -2; delta <= 2; delta++) + // Prefer the unmodified header, then try progressively larger value shifts. + for (int delta : {0, -1, 1, -2, 2}) { std::vector headerSlice(baseHeaderSlice);