Merge pull request #275 from geeksville/post1

NRF52 / RAK815 work items
pull/285/head
Kevin Hester 2020-07-13 14:14:40 -07:00 zatwierdzone przez GitHub
commit e9be03b76c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 55 dodań i 9 usunięć

Wyświetl plik

@ -22,10 +22,10 @@ This software is 100% open source and developed by a group of hobbyist experimen
We currently support three models of radios.
- TTGO T-Beam
- [T-Beam V0.7 w/ NEO-6M](https://www.aliexpress.com/item/4000574335430.html)
- [T-Beam V1.0 w/ NEO-6M - special Meshtastic version](https://www.aliexpress.com/item/4001178678568.html) (Includes built-in OLED display and they have **preinstalled** the meshtastic software)
- TTGO T-Beam (usually the recommended choice)
- [T-Beam V1.1 w/ NEO-6M - special Meshtastic version](https://www.aliexpress.com/item/4001178678568.html) (Includes built-in OLED display and they have **preinstalled** the meshtastic software)
- [T-Beam V1.0 w/ NEO-M8N](https://www.aliexpress.com/item/33047631119.html) (slightly better GPS)
- [T-Beam V0.7 w/ NEO-6M](https://www.aliexpress.com/item/4000574335430.html) (will work but **you must use the tbeam0.7 firmware ** - but the T-Beam V1.0 or later are better!)
- 3D printable cases
- [T-Beam V0](https://www.thingiverse.com/thing:3773717)
- [T-Beam V1](https://www.thingiverse.com/thing:3830711)

Wyświetl plik

@ -1,3 +1,3 @@
export VERSION=0.7.10
export VERSION=0.7.11

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -3,9 +3,9 @@
## RAK815
TODO:
* LORA: P0.23 is for PABOOST? see page 2 in RAK813 sechematic P0.22 is for HF_RF_CPS? Look up datasheet for PE4259 Until this is fixed I bet the range is quite poor. DIO2 is not controlling PABOOST on this board!
* i2c gps comms not quite right
* measure power draw
- i2c gps comms not quite right
- measure power draw
### Bootloader

Wyświetl plik

@ -12,6 +12,18 @@ RF95Interface::RF95Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOL
// FIXME - we assume devices never get destroyed
}
/** Some boards require GPIO control of tx vs rx paths */
void RF95Interface::setTransmitEnable(bool txon)
{
#ifdef RF95_TXEN
digitalWrite(RF95_TXEN, txon ? 1 : 0);
#endif
#ifdef RF95_RXEN
digitalWrite(RF95_RXEN, txon ? 0 : 1);
#endif
}
/// Initialise the Driver transport hardware and software.
/// Make sure the Driver is properly configured before calling init().
/// \return true if initialisation succeeded.
@ -30,6 +42,22 @@ bool RF95Interface::init()
digitalWrite(RF95_TCXO, 1);
#endif
/*
#define RF95_TXEN (22) // If defined, this pin should be set high prior to transmit (controls an external analog switch)
#define RF95_RXEN (23) // If defined, this pin should be set high prior to receive (controls an external analog switch)
*/
#ifdef RF95_TXEN
pinMode(RF95_TXEN, OUTPUT);
digitalWrite(RF95_TXEN, 0);
#endif
#ifdef RF95_RXEN
pinMode(RF95_RXEN, OUTPUT);
digitalWrite(RF95_RXEN, 1);
#endif
setTransmitEnable(false);
int res = lora->begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength);
DEBUG_MSG("RF95 init result %d\n", res);
@ -104,8 +132,18 @@ void RF95Interface::setStandby()
completeSending(); // If we were sending, not anymore
}
/** We override to turn on transmitter power as needed.
*/
void RF95Interface::configHardwareForSend()
{
setTransmitEnable(true);
RadioLibInterface::configHardwareForSend();
}
void RF95Interface::startReceive()
{
setTransmitEnable(false);
setStandby();
int err = lora->startReceive();
assert(err == ERR_NONE);

Wyświetl plik

@ -52,4 +52,13 @@ class RF95Interface : public RadioLibInterface
virtual void addReceiveMetadata(MeshPacket *mp);
virtual void setStandby();
/**
* We override to turn on transmitter power as needed.
*/
virtual void configHardwareForSend();
private:
/** Some boards require GPIO control of tx vs rx paths */
void setTransmitEnable(bool txon);
};

Wyświetl plik

@ -119,8 +119,7 @@ void SX1262Interface::addReceiveMetadata(MeshPacket *mp)
mp->rx_snr = lora.getSNR();
}
/** start an immediate transmit
* We override to turn on transmitter power as needed.
/** We override to turn on transmitter power as needed.
*/
void SX1262Interface::configHardwareForSend()
{