From 636719854642d841351105fa77f2f58caba1fb9c Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 23 Jan 2022 10:21:28 +0100 Subject: [PATCH] [SX127x] Fixed shaping disable (#452) --- src/modules/SX127x/SX1278.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/SX127x/SX1278.cpp b/src/modules/SX127x/SX1278.cpp index 317c38ee..685fe175 100644 --- a/src/modules/SX127x/SX1278.cpp +++ b/src/modules/SX127x/SX1278.cpp @@ -314,6 +314,11 @@ int16_t SX1278::setDataShaping(uint8_t sh) { // check modulation if(SX127x::_ook) { + // we're in OOK mode, the only thing we can do is disable + if(sh == RADIOLIB_SHAPING_NONE) { + return(setDataShapingOOK(0)); + } + return(RADIOLIB_ERR_INVALID_MODULATION); }