Browse Source

lora transmitter never needs to receive. also dont light bright white led to save more power.

Thomas Buck 4 months ago
parent
commit
24c671bf83
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/lora.cpp

+ 7
- 1
src/lora.cpp View File

28
 //#define DEBUG_LORA_RX_HEXDUMP
28
 //#define DEBUG_LORA_RX_HEXDUMP
29
 
29
 
30
 #ifdef FEATURE_SML
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
 #define OLED_BAT_INTERVAL (2UL * 60UL * 1000UL) // in ms
32
 #define OLED_BAT_INTERVAL (2UL * 60UL * 1000UL) // in ms
33
 #define FORCE_BAT_SEND_AT_OLED_INTERVAL
33
 #define FORCE_BAT_SEND_AT_OLED_INTERVAL
34
 #else // FEATURE_SML
34
 #else // FEATURE_SML
177
 
177
 
178
     radio.setDio1Action(lora_rx);
178
     radio.setDio1Action(lora_rx);
179
 
179
 
180
+#ifndef FEATURE_SML
180
     success = true;
181
     success = true;
181
     RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
182
     RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
182
     if (!success) {
183
     if (!success) {
183
         use_lora = false;
184
         use_lora = false;
184
     }
185
     }
186
+#endif // ! FEATURE_SML
185
 
187
 
186
     return r;
188
     return r;
187
 }
189
 }
283
         return;
285
         return;
284
     }
286
     }
285
 
287
 
288
+#ifndef FEATURE_SML
286
     // Start receiving
289
     // Start receiving
287
     RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
290
     RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
288
     if (!success) {
291
     if (!success) {
289
         use_lora = false;
292
         use_lora = false;
290
         return;
293
         return;
291
     }
294
     }
295
+#endif // ! FEATURE_SML
292
 
296
 
293
 #ifdef FEATURE_SML
297
 #ifdef FEATURE_SML
294
     // turn on Ve external 3.3V to power Smart Meter reader
298
     // turn on Ve external 3.3V to power Smart Meter reader
412
             }
416
             }
413
         }
417
         }
414
 
418
 
419
+#ifndef FEATURE_SML
415
         success = true;
420
         success = true;
416
         RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
421
         RADIOLIB_CHECK(radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF));
417
         if (!success) {
422
         if (!success) {
418
             use_lora = false;
423
             use_lora = false;
419
             return;
424
             return;
420
         }
425
         }
426
+#endif // ! FEATURE_SML
421
     }
427
     }
422
 
428
 
423
 #ifdef FEATURE_SML
429
 #ifdef FEATURE_SML

Loading…
Cancel
Save