Selaa lähdekoodia

Remove unused settings

Christopher Mullins 6 vuotta sitten
vanhempi
commit
b9230357a2
3 muutettua tiedostoa jossa 1 lisäystä ja 31 poistoa
  1. 0 14
      lib/Radio/NRF24MiLightRadio.cpp
  2. 1 14
      lib/Radio/PL1167_nRF24.cpp
  3. 0 3
      lib/Radio/PL1167_nRF24.h

+ 0 - 14
lib/Radio/NRF24MiLightRadio.cpp

@@ -35,20 +35,6 @@ int NRF24MiLightRadio::begin() {
 }
 
 int NRF24MiLightRadio::configure() {
-  int retval = _pl1167.setCRC(true);
-  if (retval < 0) {
-    return retval;
-  }
-
-  retval = _pl1167.setPreambleLength(3);
-  if (retval < 0) {
-    return retval;
-  }
-
-  retval = _pl1167.setTrailerLength(4);
-  if (retval < 0) {
-    return retval;
-  }
 
   retval = _pl1167.setSyncword(_config.syncword0, _config.syncword3);
   if (retval < 0) {

+ 1 - 14
lib/Radio/PL1167_nRF24.cpp

@@ -55,21 +55,8 @@ int PL1167_nRF24::recalc_parameters()
   _radio.setChannel(2 + _channel);
 
   _radio.setPayloadSize( packet_length );
-  return 0;
-}
-
-
-int PL1167_nRF24::setPreambleLength(uint8_t preambleLength)
-{ return 0; }
-/* kh- no thanks, I'll take care of this */
 
-
-int PL1167_nRF24::setSyncword(uint16_t syncword0, uint16_t syncword3)
-{
-  _syncwordLength = 5;
-  _syncword0 = syncword0;
-  _syncword3 = syncword3;
-  return recalc_parameters();
+  return 0;
 }
 
 int PL1167_nRF24::setTrailerLength(uint8_t trailerLength)

+ 0 - 3
lib/Radio/PL1167_nRF24.h

@@ -33,11 +33,8 @@ class PL1167_nRF24 {
   private:
     RF24 &_radio;
 
-    bool _crc;
-    uint8_t _preambleLength = 1;
     uint16_t _syncword0 = 0, _syncword3 = 0;
     uint8_t _syncwordLength = 4;
-    uint8_t _trailerLength = 4;
     uint8_t _maxPacketLength = 8;
 
     uint8_t _channel = 0;