|
@@ -28,7 +28,7 @@
|
28
|
28
|
//#define DEBUG_LORA_RX_HEXDUMP
|
29
|
29
|
|
30
|
30
|
#ifdef FEATURE_SML
|
31
|
|
-#define LORA_LED_BRIGHTNESS 1 // in percent, 50% brightness is plenty for this LED
|
|
31
|
+#define LORA_LED_BRIGHTNESS 0 // in percent, 50% brightness is plenty for this LED
|
32
|
32
|
#define OLED_BAT_INTERVAL (2UL * 60UL * 1000UL) // in ms
|
33
|
33
|
#define FORCE_BAT_SEND_AT_OLED_INTERVAL
|
34
|
34
|
#else // FEATURE_SML
|
|
@@ -177,11 +177,13 @@ static bool lora_tx(enum lora_sml_type type, double value) {
|
177
|
177
|
|
178
|
178
|
radio.setDio1Action(lora_rx);
|
179
|
179
|
|
|
180
|
+#ifndef FEATURE_SML
|
180
|
181
|
success = true;
|
181
|
182
|
RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
|
182
|
183
|
if (!success) {
|
183
|
184
|
use_lora = false;
|
184
|
185
|
}
|
|
186
|
+#endif // ! FEATURE_SML
|
185
|
187
|
|
186
|
188
|
return r;
|
187
|
189
|
}
|
|
@@ -283,12 +285,14 @@ void lora_init(void) {
|
283
|
285
|
return;
|
284
|
286
|
}
|
285
|
287
|
|
|
288
|
+#ifndef FEATURE_SML
|
286
|
289
|
// Start receiving
|
287
|
290
|
RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
|
288
|
291
|
if (!success) {
|
289
|
292
|
use_lora = false;
|
290
|
293
|
return;
|
291
|
294
|
}
|
|
295
|
+#endif // ! FEATURE_SML
|
292
|
296
|
|
293
|
297
|
#ifdef FEATURE_SML
|
294
|
298
|
// turn on Ve external 3.3V to power Smart Meter reader
|
|
@@ -412,12 +416,14 @@ void lora_run(void) {
|
412
|
416
|
}
|
413
|
417
|
}
|
414
|
418
|
|
|
419
|
+#ifndef FEATURE_SML
|
415
|
420
|
success = true;
|
416
|
421
|
RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
|
417
|
422
|
if (!success) {
|
418
|
423
|
use_lora = false;
|
419
|
424
|
return;
|
420
|
425
|
}
|
|
426
|
+#endif // ! FEATURE_SML
|
421
|
427
|
}
|
422
|
428
|
|
423
|
429
|
#ifdef FEATURE_SML
|